A basic tutorial on SQLITE3_QUERY
SQLITE3_QUERY query;
or you can create a query with a sql template
SQLITE#_QUERY query("SELECT * FROM ? WHERE id > ?;");
query.set_query_template("SELECT * FROM ? WHERE id > ?;");
query.add_binding("TestTable");
or
std::string table_name = "TestTable";
query.add_binding(table_name);
or
char* table_name = "TestTable";
query.add_binding(table_name);
or you can add multiple bindings at the same time
query.add_binding("TestTable", "100");
// you can use const char*, char* or std::string
query.reset_binding();
query.bind()
std::string sql_query = query.bound_query;
// good
query.set_query_template("SELECT * FROM ?;").reset_binding().add_binding("test");
// error
query.set_query_template("SELECT * FROM ?;").reset_binding().add_binding("test").bind();
You cannot chain function calls after add_binding.