Re: get the SQL to be executed
Joe Carter <[email protected]> Thu, 19 Jan 2012 08:32:28 +0000
| Newsgroups | gmane.comp.jakarta.turbine.torque.user |
|---|---|
| Message-ID | <CACcs02vbP1CE3nPD0CVZ2dt7ZiXjWdY3dO2-j2EwVkcBnPdUag@mail.gmail.com> |
You can use a logging driver such as p6spy to see your SQL statements. http://sourceforge.net/projects/p6spy/ On 19 January 2012 08:25, Thomas Fox <[email protected]> wrote: > Perhaps you can use the log output (with some tweaks to the log4j > configuration). However I'm not sure how and if Torque 3.3 logs the updat= e > statements. But then again I've heard of drivers which at as a bridge > between the application and the real driver (e.g > http://www.squirrelsql.org/) and which can do the logging for you. > > Torque 4 will not work because it uses prepared statements for updates, > this will not give you any sensible sql. > > =A0 =A0Thomas > >> Hello all, is there a way in Torque to get the SQL that is sent to the > DB. >> I have to generate a txt file where I save queries basically INSERT >> statements of long records. >> I was thinking of create the Torque classes, populate the objects with >> data that I get from a local instance of the DB and then, instead of >> using a save command, get the SQL that would be executed and store it in >> a file. >> >> Alternatively I could use this: >> >> http://openhms.sourceforge.net/sqlbuilder/ >> >> but has dependencies that requires GPL license and I would avoid in this >> case that kind of license. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >