Re: Synthesize support for Statement.getGeneratedKeys()?
| От | Ken Johanson |
|---|---|
| Тема | Re: Synthesize support for Statement.getGeneratedKeys()? |
| Дата | |
| Msg-id | 45D24BF2.6010405@kensystem.com обсуждение исходный текст |
| Ответ на | Re: Synthesize support for Statement.getGeneratedKeys()? (Kris Jurka <books@ejurka.com>) |
| Ответы |
Re: Synthesize support for Statement.getGeneratedKeys()?
|
| Список | pgsql-jdbc |
Kris Jurka wrote:
>
>
> On Mon, 29 Jan 2007, Ken Johanson wrote:
>
>> Hi Kris, were you able to look at this? If time wont permit that I'll
>> dig back in; though I'd prefer not to duplicate any work your're
>> doing, of course.
>
> Taking another look the obvious problem is that you haven't touched
> AbstractJdbc3Statement.getGeneratedKeys. It still reads:
>
> public ResultSet getGeneratedKeys() throws SQLException
> {
> return createDriverResultSet(new Field[0], new Vector());
> }
>
> So an empty ResultSet is not surprising.
>
> Kris Jurka
Kris, sorry my response is late. Sometimes I get distracted by life :-)
Thanks for pointing that out. I missed the obvious. The following
replacement for that methods works; I can get the generated keys (in
conjunction with my previous patches).
I have not tested this exhaustively, nor given though about the
correctness of the null-normalization below; is this enough for you or
someone to commit the changes?
Thanks,
Ken
public ResultSet getGeneratedKeys() throws SQLException
{
return result==null ?
createDriverResultSet(new Field[0], new Vector())
: result.getResultSet();
}
В списке pgsql-jdbc по дате отправления: