Re: Prepared Statements

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Prepared Statements
Дата
Msg-id 1058803785.24801.357.camel@coppola.ecircle.de
обсуждение исходный текст
Ответ на Re: Prepared Statements  (Dmitry Tkach <dmitry@openratings.com>)
Список pgsql-jdbc
> >Just one more question Dima, how will you at runtime that the current
> >driver supports this functionality ? (for that matter, how do you know
> >now ?)
> >
> I am not sure what you mean by 'runtime' in this context.

I mean how does your code decide if this or that functionality is
available or not ? You can only make sure about that by trying out each
driver version you support for some functionality.

For example if you have written code which tests for postgres driver and
does not check the version of that driver, then after this change your
runtime code will not work anymore with new postgres drivers, because it
falsely presumes they support setting a list of integers as a parameter
using the setObject(x, String, Types.INTEGER) workaround.

On the other hand if your code does check version numbers, then indeed
you have to have some kind of list for each such feature of the drivers
supporting it, with the versions which support it, and you have to
follow when they stop doing it, etc. And you have to hard-code this
information in the application code so it has it at runtime, to be able
to make those decisions...

I guess this is a lot of maintenance work...

I was just wondering how you manage it.

Cheers,
Csaba.



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

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: Prepared Statements
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Prepared Statements