Skip site navigation (1) Skip section navigation (2)

Re: PreparedStatement.toString() creates valid SQL; was: Q: use setObject also for int or string

From: Michael Enke <michael(dot)enke(at)wincor-nixdorf(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PreparedStatement.toString() creates valid SQL; was: Q: use setObject also for int or string
Date: 2008-09-23 20:32:13
Message-ID: (view raw or whole thread)
Lists: pgsql-jdbc
Kris Jurka schrieb:
>> Attached file contains all changed java sources to make your testcase
>> working. I added to ParameterList interface a method toSQLString(int).
> What is the reason for this instead of using the existing toString(int)
> method?  If toSQLString is required, how can CompositeParameterList's
> toSQLString just call toString?

I used separate method cause I do not know of any side effects,
maybe toString(int) has to output exactly what it did before?
If not, toSQLString() can replace toString().
Then also the CompositeParameterList would be ok immediately.

I did not look into CompositeParameterList how it's toString works.
Now I've seen that it simply calls the SimpleParameterList.toString().
So if toString can be the new output, all is ok.

What's about the v2 Parameter? Should also output new style?

> Also, context diffs are appreciated instead of the whole file.



WINCOR NIXDORF International GmbH 
Sitz der Gesellschaft: Paderborn 
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller 
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. 

In response to

pgsql-jdbc by date

Next:From: Gohil, HemantDate: 2008-09-23 22:05:09
Subject: Re: stored procedure returning result set.
Previous:From: Kris JurkaDate: 2008-09-23 20:15:38
Subject: Re: stored procedure returning result set.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group