How to use streams with MySql (works for postgres) #86
-
So i had an sql query, one as vec, one as stream. The vectors one works great, the stream don't, but the excatly same functions works when i change it to postgres (don't mind the linting errors in the methods, my lsp broke ;p)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The issue here is that both stream types are not supposed to be equal. The postgres stream type is independent from the underlying connection, while the mysql stream type requires a connection for the whole time. That means the connection must outlive the stream. That's not the case in your example, as the connection is dropped by the end of the |
Beta Was this translation helpful? Give feedback.
The issue here is that both stream types are not supposed to be equal. The postgres stream type is independent from the underlying connection, while the mysql stream type requires a connection for the whole time. That means the connection must outlive the stream. That's not the case in your example, as the connection is dropped by the end of the
get_notes_by_user_uuid_stream_stream
function, while the stream itself is returned by that function.