summaryrefslogtreecommitdiff
path: root/src/database/sqlite3_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/sqlite3_engine.cpp')
-rw-r--r--src/database/sqlite3_engine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/database/sqlite3_engine.cpp b/src/database/sqlite3_engine.cpp
index 92d514b..ae4a146 100644
--- a/src/database/sqlite3_engine.cpp
+++ b/src/database/sqlite3_engine.cpp
@@ -6,6 +6,8 @@
#include <database/sqlite3_statement.hpp>
+#include <database/query.hpp>
+
#include <utils/tolower.hpp>
#include <logger/logger.hpp>
#include <vector>
@@ -57,6 +59,11 @@ std::unique_ptr<DatabaseEngine> Sqlite3Engine::open(const std::string& filename)
std::tuple<bool, std::string> Sqlite3Engine::raw_exec(const std::string& query)
{
+#ifdef DEBUG_SQL_QUERIES
+ log_debug("SQL QUERY: ", query);
+ const auto timer = make_sql_timer();
+#endif
+
char* error;
const auto result = sqlite3_exec(db, query.data(), nullptr, nullptr, &error);
if (result != SQLITE_OK)