[
https://issues.apache.org/jira/browse/DERBY-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752279#action_12752279
]
Dag H. Wanvik commented on DERBY-3676:
--------------------------------------
Thanks for the revised patch, Mark!
The present patch changes the semantics of toString() for an embedded prepared
statement instead of
using a new method. Instead the old semantics are made available as
EmbedPreparedStatement.idString, which is OK for
the test that uses it (StatementPlanCacheTest).
What happens to lobs and stream arguments?
The purpose of the new interface is only to document the semantics of toString,
I gather.
What do people think, is it ok to change toString to let it print the text of
the prepared statement with the filled in arguments?
Cf discussion about breaking compatibility earlier on this thread.
I wonder if it would not be safer to let toString be unchanged and use a new
method in the introduced API interface
with a name like "getExpandedSQLText" or some such (I think
toHumanReadbleString isn't very good - mostly strings are readable..)
> 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
> Attachments: humanstringprepared.txt, humanstringprepared.txt,
> humanstringprepared.txt, humanstringprepared.txt, humanstringprepared.txt,
> humanstringprepared.txt, humanstringprepared.txt, ick.txt, ick.txt
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.