Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Logging each actual *real* SQL query

Well the exact query that runs on the query does have the binds in
there. As for the data types of the binds and capturing that, perhaps
some eclipselink team members can help you.

./tch



On Thu, Sep 9, 2010 at 6:54 PM, Torbjorn Kristoffersen
<torbjoern@xxxxxxxxx> wrote:
> How would one go about retrieving each SQL query that the JPA (in this case,
> EclipseLink 2) layer performs on the database?
> I am interested in absolutely all the SQL queries.  I tried intercepting
> them using postUpdate, postInsert and so on, but seeing I use parameter
> binding I can't get the actual native SQL query, illustrated by the the FINE
> logging as seen in my Glassfish log:
> SELECT x,y,z FROM footable WHERE My_ID = ? LIMIT ? OFFSET ?
>         bind => [274087, 15, 0]|#]
> I need to find out the exact query that is run on the actual SQL server.  In
> the case above, I can't be certain whether 274087 is an int, or a string.
>  If it is a string, then I it would have to be enclosed in quotes.
> So what I'm looking for is the following result:
> SELECT x,y,z FROM footable WHERE My_ID = '274087' LIMIT 15 OFFSET 0
> Hope someone can help... Thanks!
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>


Back to the top