From e1315807021fe4f21d145195b012a9d0cb3feb2e Mon Sep 17 00:00:00 2001 From: dec05eba <0xdec05eba@gmail.com> Date: Mon, 21 May 2018 02:36:19 +0200 Subject: Add sql debug, fix action counter in request wrong number --- src/sql/SqlExec.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/sql/SqlExec.cpp') 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 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) { -- cgit v1.2.3