[ 
https://issues.apache.org/jira/browse/DERBY-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091883#comment-13091883
 ] 

Rick Hillegas commented on DERBY-3676:
--------------------------------------

Do we understand the use case for this change to the toString() method? The 
original email thread doesn't indicate why users want this feature. Is it for 
development/debugging purposes or is there a production use case?

In other email threads, I see development/debugging needs for this toString() 
behavior. See for instance 
http://www.javakb.com/Uwe/Forum.aspx/java-databases/1003/PreparedStatement-toString

For that use case, there seem to be some freeware workarounds. See 
http://code.google.com/p/jdbc-trace-wrapper/ and 
http://www.javaworld.com/javaworld/jw-01-2002/jw-0125-overpower.html

Thanks,
-Rick

> Make the toString() method of Derby PreparedStatements print out SQL text 
> with ? parameters replaced by the values that have been set so far
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3676
>                 URL: https://issues.apache.org/jira/browse/DERBY-3676
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>            Reporter: Rick Hillegas
>            Assignee: Siddharth Srivastava
>         Attachments: d3676.patch, humanstringprepared.txt, 
> humanstringprepared.txt, humanstringprepared.txt, humanstringprepared.txt, 
> humanstringprepared.txt, humanstringprepared.txt, humanstringprepared.txt, 
> ick.txt, ick.txt, prepared.diff, statementCacheVTI.sql
>
>
> This topic came up in the following email thread on the user list: 
> http://www.nabble.com/PreparedStatement.toString%28%29---nice-formatting-td17250811.html#a17250811
>  Here's what the thread requests: 
> "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."
> At first blush, this seems like it might be a simple project for a newcomer.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to