Discussion:
[soci-users] How to get the final query string
JP
2013-11-08 17:12:13 UTC
Permalink
Hi all,

is there any way to get the final query string that is used by the backend?
The available methods like "get_last_query" and "get_query_strem" return
the query string as specified to the session, without replacing the items
like ":name" with the current value specified using soci::use(name). This
functionality would be very interesting for debugging, at least in my
case...

Thanks a lot in advance,
JP
Vadim Zeitlin
2013-11-12 14:05:16 UTC
Permalink
On Fri, 8 Nov 2013 18:12:13 +0100 JP <***@gmail.com> wrote:

J> is there any way to get the final query string that is used by the backend?
J> The available methods like "get_last_query" and "get_query_strem" return
J> the query string as specified to the session, without replacing the items
J> like ":name" with the current value specified using soci::use(name). This
J> functionality would be very interesting for debugging, at least in my
J> case...

In mine (and I suspect that of quite a few others) too. Unfortunately
there is no way to do it now, but there is a pull request for it at

https://github.com/SOCI/soci/pull/138

I still hope to get to it one day and refactor it to work at common code
level instead of being done for each backend individually, but haven't had
time to do it since more than half a year, so I really don't know when is
this going to happen. If you're interested in looking at this, please do!

Regards,
VZ

Loading...