... note that actual bind values are logged in TRACE level
2013/1/4 Lukas Eder <[email protected]> > Hi Anthony, > > jOOQ logs all queries to your preferred logger in DEBUG level. This is > documented here: > http://www.jooq.org/doc/2.6/manual/sql-execution/logging/ > > You can also write your own ExecuteListener to hook into jOOQ's execution > lifecycle: > http://www.jooq.org/doc/2.6/manual/sql-execution/execute-listeners/ > > Cheers > Lukas > > > 2013/1/4 Anthony Harris <[email protected]> > >> Hi Lukas, >> >> I'm generating a query that ends up being rejected by the db and would >> like to know exactly what query is being executed (including bind >> parameters). >> >> The thing is, looking at the string representation of the SelectLimitStep >> (on which I invoke fetchLazy()) via the debugger, the generated query >> appears to be correct - that is, I can copy and paste it directly into >> sqlplus and it gives exactly the expected result (connected as the same >> user to the same database as the test code is). >> >> In fact, in writing this, I realised that I could solve the issue as >> follows: >> SelectLimitStep query = generateQuery(); >> String sql = query.toString(); // new >> db.fetchLazy(sql); // was query.fetchLazy(); >> >> So, for now, I'll go with this workaround, but it would be nice to know >> what's being executed in the original case. >> >> Cheers, >> Anthony >> >> >
