db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: PreparedStatement.toString() - nice formatting
Date Thu, 15 May 2008 16:24:06 GMT
Hi Will,

Thanks for bringing this up. I have logged DERBY-3676 to track this 
request. At first blush this looks like a straightforward project for a 
newcomer. If you want to implement this yourself, I would be happy to 
coach you through the code.

Regards,
-Rick

wbecker wrote:
> Is there a way to get a PreparedStatement to tell you what it is going to
> give as a query to the db?
>
> In mysql, a toString() on a PreparedStatement will do this, eg "select x
> from foo where x.a = ?" will become "select x from foo where x.a = 1" with
> the appropriate setValue() call. Is there a way to get a similar result with
> Derby? All I seem to get is a string of gibberish, eg:
> :54b48415-0119-ec3b-91d2-000001bca0c8"
>
> Cheers,
> Will
>   


Mime
View raw message