db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: behavior of Statement.getGeneratedKeys()
Date Thu, 13 Jul 2006 17:44:54 GMT
Lance J. Andersen wrote:

> I discussed this briefly at my JDBC EG meeting yesterday.
> As i expected, all of the vendors on the call indicated that they return
> the same data type for key returned in the case of column defined as
> identity via the getGeneratedKeys() method.  The consensus was that this
> is what a user would expect.
> As to the unique key question posed by Dan, this is going to be an
> ongoing EG discussion as some vendors do return identity columns values
> in cases that  are not unique (because the backend like Derby allows for
> it) which gets complex as some vendors also in some cases support
> returning a ROWID currently (but this is a difference scenario then
> using a defined column in the table).

Beyond that it's also unclear what should a driver do if the application
requests columns in the ResultSet that are not generated or identity

E.g. with the example in section 13.6 of JDBC 4 what is the expected
behaviour if the column list is any of:

         {"ORDER_ID", "ISBN"}
         {"ORDER_ID", "ORDER_DATE"}

where ORDER_DATE is a column that has a default of CURRENT_DATE (ie.
value not provided by the INSERT).


View raw message