You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a statement for batch insert, so I used bind_fields to put the values from my buffer into the query, instead of using one giant tuple.
However, it seems that qtl::execute clears binders (or sth else is happening), because the query always executes empty.
How can I omit that behavior? Or maybe I completely misunderstood the goal of bind_fields?
Is there another, proper way for such binding, that I somehow didn't notice? Edit: It seems like I should use bind_params instead of bind_fields... Though the question still remains.
Also, it is impossible to call qtl::execute whithout any data, so how to do that? Is passing an empty tuple<>() alright? It would be great if there was a predefined type for that, or possibly another overload.
The text was updated successfully, but these errors were encountered:
herhor67
changed the title
Binding fields (data to query) externally
Binding fields (data to query) iteratively
Mar 14, 2023
bind_params is used to bind query parameters, bind_fields is used to receive query result fields. If you has not any parameters, should use simple_execute.
Hello,
I have a statement for batch insert, so I used
bind_fields
to put the values from my buffer into the query, instead of using one giant tuple.However, it seems that
qtl::execute
clears binders (or sth else is happening), because the query always executes empty.How can I omit that behavior? Or maybe I completely misunderstood the goal of
bind_fields
?Is there another, proper way for such binding, that I somehow didn't notice?
Edit: It seems like I should use
bind_params
instead ofbind_fields
... Though the question still remains.Also, it is impossible to call
qtl::execute
whithout any data, so how to do that? Is passing an emptytuple<>()
alright? It would be great if there was a predefined type for that, or possibly another overload.The text was updated successfully, but these errors were encountered: