aboutsummaryrefslogtreecommitdiff
path: root/src/sql/SqlQuery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/SqlQuery.cpp')
-rw-r--r--src/sql/SqlQuery.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sql/SqlQuery.cpp b/src/sql/SqlQuery.cpp
index 6201332..24694db 100644
--- a/src/sql/SqlQuery.cpp
+++ b/src/sql/SqlQuery.cpp
@@ -1,4 +1,5 @@
#include "../../include/odhtdb/sql/SqlQuery.hpp"
+#include "../../include/odhtdb/Log.hpp"
#include <sqlite3.h>
namespace odhtdb
@@ -29,6 +30,16 @@ namespace odhtdb
throw SqlQueryException(errMsg);
}
+#ifdef ODHTDB_SQL_DEBUG
+ Log::debug("Executing sql query: %s; args(%u): ", sql, args.size());
+ usize i = 0;
+ for(const SqlArg &arg : args)
+ {
+ Log::debug("arg(%u): %s", i, arg.toString().c_str());
+ ++i;
+ }
+#endif
+
int paramIndex = 1;
for(const SqlArg &arg : args)
{