Re: Prepared Statements

Поиск
Список
Период
Сортировка
От Darin Ohashi
Тема Re: Prepared Statements
Дата
Msg-id F17255C2B596D3119A5600508B44FA68052EB869@courier.maplesoft.on.ca
обсуждение исходный текст
Ответ на Prepared Statements  (Julien Le Goff <julien.legoff@laposte.net>)
Ответы Re: Prepared Statements
Re: Prepared Statements
Re: Prepared Statements
Список pgsql-jdbc
If I could throw in a question from the sidelines...

Is this something that a PreparedStatement should be able to handle, in general?

>
> select * from sometable where x in ?;
> setObject (1, "(1,2,3,4,5)", Types.INTEGER);
>
>

With a PreparedStatement that gets precompiled, will a substitution like this
work?  Do other JDBC drivers support this kind of substitution?

It looks like you are exploiting a bug (or perhaps an out of spec behaviour) in
the JDBC.  If that is the case, then I don't have much sympathy for you losing
this functionality.

Instead of creating your own driver, why not just subclass Statement into
something that looks like a PreparedStatement but just glues strings together?
That sounds like what you want anyway.  It also seems like a much eaiser task,
especially for long term maintainance.

Darin

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

Предыдущее
От: Felipe Schnack
Дата:
Сообщение: Re: Prepared Statements
Следующее
От: Kim Ho
Дата:
Сообщение: Re: Prepared Statements