Move a few functions from select_query to query

This commit is contained in:
louiz’
2017-06-23 00:13:38 +02:00
parent 8a7166eef9
commit b71ca15a0f
4 changed files with 66 additions and 53 deletions
+14 -1
View File
@@ -18,4 +18,17 @@ void actual_add_param(Query& query, const OptionalBool& val)
query.params.push_back("1");
else
query.params.push_back("-1");
}
}
Query& operator<<(Query& query, const char* str)
{
query.body += str;
return query;
}
Query& operator<<(Query& query, const std::string& str)
{
query.body += "?";
actual_add_param(query, str);
return query;
}