Page 1 of 1

SQL statement string

PostPosted: Thu Jul 19, 2012 6:24 pm
by marat
Is there a way to view the SQL values string used in an qx::dao::insert(...) or qx::dao::fetch_by_query(...), or qx::dao::insert(...) ?

There is some standard output which shows the SQL statement, but not the actual values. I am looking for the complete SQL.

Code: Select all
[QxOrm] sql query (11 ms) : INSERT INTO ExpTable (intVec, dtVec, uDev, updateTime, tradeTime, orderSide) VALUES (:intVec, :dtVec, :uDev, :updateTime, :tradeTime, :orderSide)

Re: SQL statement string

PostPosted: Fri Jul 20, 2012 8:34 am
by QxOrm admin
There is some standard output which shows the SQL statement, but not the actual values. I am looking for the complete SQL.

This is the complete SQL sent to your database !
QxOrm library uses placeholder : this is the faster way and more secure way to send SQL to your database (to avoid SQL injection for example : http://en.wikipedia.org/wiki/SQL_injection).

If you want to see the values sent to your database, you can use qx::dump(my_object) for example : all registered classes in QxOrm context can be dumped in a XML format.
Or take a look on your tool to manage your SGBD, sometimes there is some logs available...