Re: getGeneratedKeys()

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: getGeneratedKeys()
Дата
Msg-id Pine.LNX.4.33.0312302132390.18760-100000@leary.csoft.net
обсуждение исходный текст
Ответ на Re: getGeneratedKeys()  (<henr-and@dsv.su.se>)
Список pgsql-jdbc

On Tue, 30 Dec 2003 henr-and@dsv.su.se wrote:

>
> > This method has not been implemented and most likely will not be
> > implemented anytime soon.  First it is unclear to me what it means by
> > auto-generated keys.  Does it mean just things like serial or anything
> > that a before insert trigger does to modify the row?
>
> In my case it's a serial. I want to get the id-number that my insert
> generates.
> MySQL's JDBC-driver has implemented the method.
>

They have implemented the method, but they have not answered any of the
questions I have raised.  Their getGeneratedKeys call just wraps
getLastInsertID().  This would be the equivalent of us providing a currval
like function that didn't take a sequence argument.  It is largely useless
in the face of after insert triggers calling another sequence's nextval
and tables with multiple serial columns.  This doesn't even get into the
before trigger case.

Also with mysql's timestamp type auto-updating itself, shouldn't that be
returned as well?

Does anyone know of any documention other than the API javadoc?  The
DatabaseMetaData functions that return ResultSets list the columns and
their contents, but this Statement function does no such thing.

Kris Jurka


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

Предыдущее
От:
Дата:
Сообщение: Re: getGeneratedKeys()
Следующее
От: "John Sidney-Woollett"
Дата:
Сообщение: Re: getGeneratedKeys()