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

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: PreparedStatement.toString() creates valid SQL; was: Q: use setObject also for int or string
Дата
Msg-id Pine.BSO.4.64.0809230059240.773@leary.csoft.net
обсуждение исходный текст
Ответ на Re: PreparedStatement.toString() creates valid SQL; was: Q: use setObject also for int or string  (Michael Enke <michael.enke@wincor-nixdorf.com>)
Ответы Re: PreparedStatement.toString() creates valid SQL; was: Q: use setObject also for int or string  (Michael Enke <michael.enke@wincor-nixdorf.com>)
Список pgsql-jdbc

On Mon, 22 Sep 2008, Michael Enke wrote:

> 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 did not implement the InputStream because
> 1) I do not know the encoding of data
> 2) it could be an InputStream which can not be reset
>

That's fair.  I was just pointing out that you can't always produce a text
representation for the prepared statement.  Your changes are certainly an
improvement.

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

Kris Jurka

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: burferd
Дата:
Сообщение: Re: Problems connecting to database
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: COPY support in JDBC driver?