[
https://issues.apache.org/jira/browse/DERBY-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siddharth Srivastava updated DERBY-3676:
----------------------------------------
Attachment: d3676.patch
The attached patch gives the output of the ps.toString() as discussed earlier.
Please review it.
I have a few doubts:
I have included the tests for this patch in PrepareStatementTest (Is that ok ?
) (Tests not in the patch at the moment)
Secondly, how to get CacheID in the tests now. As we have replaced the
toString() method of EmbedPreparedStatement ?
Would it be a good idea to have an interface like PreparedStatementCacheID,
having a method getCacheId(),
which returns the cacheID for EmbedPreparedStatement and returns null for
PreparedStatement (client) ?
> 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