[odb-users] SQL Statement Tracer

Sum, Eric B eric.b.sum at lmco.com
Wed Aug 15 11:09:34 EDT 2012


I have been trying out the SQL Statement execution tracer.  It's a very neat and useful tool for debugging.  I have a question about it (I am using a sqlite database).

When I use the tracer to print out the statements (either with the built-in stderr_tracer or my own odb::sqlite::tracer implementation), I have been unable to print out the values associated with the SQL statement.  For example, if I persist objects into a table.  It prints something along the lines of

INSERT INTO table VALUES (?,?,?)

It looks like the parameters for the sqlite_statement are being print out unbound.  I was wondering if it is possible to get it to print something like:

INSERT INTO table VALUES(1,2,3) where the bound values appear rather than "?"

I have looked through the odb::sqlite::statement class to see if there are any particular functions specific to sqlite that I can use for this, but I am unable to find any.  I might have missed it.

Thanks so much,

More information about the odb-users mailing list