Skip to content

Binding fields (data to query) iteratively #22

@dawinaj

Description

@dawinaj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions