Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 85193 invoked from network); 20 May 2008 15:37:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 May 2008 15:37:24 -0000 Received: (qmail 10505 invoked by uid 500); 20 May 2008 15:37:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 10280 invoked by uid 500); 20 May 2008 15:37:25 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 10269 invoked by uid 99); 20 May 2008 15:37:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 08:37:25 -0700 X-ASF-Spam-Status: No, hits=-1999.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 15:36:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9A032234C11A for ; Tue, 20 May 2008 08:36:55 -0700 (PDT) Message-ID: <440045520.1211297815629.JavaMail.jira@brutus> Date: Tue, 20 May 2008 08:36:55 -0700 (PDT) From: "mike bell (JIRA)" To: derby-dev@db.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 In-Reply-To: <794244824.1210868515653.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598328#action_12598328 ] mike bell commented on DERBY-3676: ---------------------------------- 1. Also, If I understand correctly, you are saying there's no way to expose this info if runnning the client driver (I guess that makes some sense sadly, the info would be on the server side)? 2. And if it were moved to EmbeddedDriver, how would one make it thread safe (before I was following the other methods in the class and syncing on connection)? I mean those are ugly public thingies? I know a Connection isn't thread safe by JDBC, and I guess that implies PreparedStatements aren't either, too though. But assumedly there was good reason for syncing on Connection? Or was this an abortive attempt to achieve a thread-safe driver? > 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: New Feature > Components: JDBC, Newcomer > Reporter: Rick Hillegas > Attachments: 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.