Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 64640 invoked from network); 16 May 2008 15:29:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 May 2008 15:29:52 -0000 Received: (qmail 88080 invoked by uid 500); 16 May 2008 15:29:52 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 88061 invoked by uid 500); 16 May 2008 15:29:52 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 88050 invoked by uid 99); 16 May 2008 15:29:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2008 08:29:52 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.43.132] (HELO sca-es-mail-1.sun.com) (192.18.43.132) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2008 15:28:57 +0000 Received: from fe-sfbay-09.sun.com ([192.18.43.129]) by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m4GFTIbl024109 for ; Fri, 16 May 2008 08:29:18 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K0Y00901VQLGK00@fe-sfbay-09.sun.com> (original mail from Richard.Hillegas@Sun.COM) for derby-user@db.apache.org; Fri, 16 May 2008 08:29:18 -0700 (PDT) Received: from richard-hillegas-computer.local ([129.150.16.93]) by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K0Y00A8DWCNG2E0@fe-sfbay-09.sun.com> for derby-user@db.apache.org; Fri, 16 May 2008 08:29:11 -0700 (PDT) Date: Fri, 16 May 2008 08:29:13 -0700 From: Rick Hillegas Subject: Re: PreparedStatement.toString() - nice formatting In-reply-to: <17272201.post@talk.nabble.com> Sender: Richard.Hillegas@Sun.COM To: Derby Discussion Message-id: <482DA849.8070004@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <17250811.post@talk.nabble.com> <482C63A6.6070908@sun.com> <17272201.post@talk.nabble.com> User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) X-Virus-Checked: Checked by ClamAV on apache.org Thanks for pushing this forward, Will. I have added another suggestion to DERBY-3676, an approach which could leverage what you've built already. Let's see if the community can improve this or surface more problems. Would the suggested approach satisfy your needs? Regards, -Rick wbecker wrote: > I wrote a fix for this, but seeing the comments at > https://issues.apache.org/jira/browse/DERBY-3676 I am not sure its a good > idea. > > > Rick Hillegas-2 wrote: > >> Hi Will, >> >> Thanks for bringing this up. I have logged DERBY-3676 to track this >> request. At first blush this looks like a straightforward project for a >> newcomer. If you want to implement this yourself, I would be happy to >> coach you through the code. >> >> Regards, >> -Rick >> >> wbecker wrote: >> >>> Is there a way to get a PreparedStatement to tell you what it is going to >>> give as a query to the db? >>> >>> 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. Is there a way to get a similar result >>> with >>> Derby? All I seem to get is a string of gibberish, eg: >>> :54b48415-0119-ec3b-91d2-000001bca0c8" >>> >>> Cheers, >>> Will >>> >>> >> >> > >