diff options
Diffstat (limited to 'src/sql/SqlExec.cpp')
-rw-r--r-- | src/sql/SqlExec.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sql/SqlExec.cpp b/src/sql/SqlExec.cpp index bdb0fbd..52d953f 100644 --- a/src/sql/SqlExec.cpp +++ b/src/sql/SqlExec.cpp @@ -1,4 +1,5 @@ #include "../../include/odhtdb/sql/SqlExec.hpp" +#include "../../include/odhtdb/Log.hpp" #include <sqlite3.h> namespace odhtdb @@ -39,6 +40,16 @@ namespace odhtdb throw SqlExecException(errMsg); } +#ifdef ODHTDB_SQL_DEBUG + Log::debug("Executing sql exec: %s; args(%u): ", sqlite3_sql(stmt), 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) { |