summaryrefslogtreecommitdiff
path: root/src/database/query.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/query.hpp')
-rw-r--r--src/database/query.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/database/query.hpp b/src/database/query.hpp
index 92845d0..b77a421 100644
--- a/src/database/query.hpp
+++ b/src/database/query.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include <database/statement.hpp>
+
#include <logger/logger.hpp>
#include <vector>
@@ -16,7 +18,7 @@ struct Query
body(std::move(str))
{}
- sqlite3_stmt* prepare(sqlite3* db)
+ Statement prepare(sqlite3* db)
{
sqlite3_stmt* statement;
log_debug(this->body);
@@ -27,7 +29,7 @@ struct Query
log_error("Error preparing statement: ", sqlite3_errmsg(db));
return nullptr;
}
- return statement;
+ return {statement};
}
};