-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Something like this:
auto stmt=db.open_command(sql_query); // string sql_query created with code, possible different WHERE conditions
// different parameters added
if (opt_id != 0) {
stmt << opt_id;
stmt << opt_other;
} else {
stmt << opt_other;
}
// this should work
db.query(stmt,
[&](const string &field1, const string &field2, const uint64_t &field3) {
// the body of the lambda function is long and there's no need to repeat it.
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels