summaryrefslogtreecommitdiff
path: root/src/database/query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/query.cpp')
-rw-r--r--src/database/query.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/database/query.cpp b/src/database/query.cpp
index e6cf072..ba63a92 100644
--- a/src/database/query.cpp
+++ b/src/database/query.cpp
@@ -18,4 +18,17 @@ void actual_add_param(Query& query, const OptionalBool& val)
query.params.push_back("1");
else
query.params.push_back("-1");
-} \ No newline at end of file
+}
+
+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;
+}