Re: Synthesize support for Statement.getGeneratedKeys()?
| От | Ken Johanson |
|---|---|
| Тема | Re: Synthesize support for Statement.getGeneratedKeys()? |
| Дата | |
| Msg-id | 45D53379.8070902@kensystem.com обсуждение исходный текст |
| Ответ на | Re: Synthesize support for Statement.getGeneratedKeys()? (Kris Jurka <books@ejurka.com>) |
| Список | pgsql-jdbc |
Kris Jurka wrote:
>
> The correct version check should be written:
> if (connection.haveMinimumServerVersion("8.2"))
>
I will correct this.
> I'm also not sure about the getGeneratedKeys method. Should we throw an
> Exception instead of returning an empty ResultSet if there weren't any
> generated keys?
I checked and the spec says:
"If this Statement object did not generate any keys, an empty ResultSet
object is returned."
If there is an implied rules elsewhere that it is not this simple, I
dont know. Otherwise it seems correct.
Also do we need to do better tracking of what comes
> from generated keys vs just regular results?
I believe you are correct; if that method is called not-after
executeUpdate(String sql, ?), it should throw and exception.. or
something... the spec does not seem to elaborate on this.
Once people start using
> this functionality we'll need some better error checking.
Agreed in full.
В списке pgsql-jdbc по дате отправления: