db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark B (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3676) Make the toString() method of Derby PreparedStatements print out SQL text with ? parameters replaced by the values that have been set so far
Date Tue, 08 Sep 2009 02:08:58 GMT

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

Mark B commented on DERBY-3676:
-------------------------------

Hi Dag,

My understanding - I'll try to check in more detail, the javadoc is a touch ambiguous - is
that lobs / streams return a coherent getString() even so, so that aspect *should* work reasonably;

the reason I've been - for what it's worth - favouring the toString() / idString() arrangement
is that the OP was comparing to the "intuitive" behaviour in MySQL; 

Even though naturally as you say there's the question of compatibility, there are no signs
of more general breakages from the change;

[what would henceforth be] idString() really is very 'internal' from the looks of it, most
noticeably the fact that the client had no implementation of it;

I hope, too, that I've correctly read the initial opinions people had, that seemed to weigh
generally in favour of giving toString() its new effect

I'm very ready to listen to the voice/s of experience though, it's definitely worth reviewing
:-)

Best regards

Mark

> 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.


Mime
View raw message