Subject | Re: Update WHERE CURRENT OF vs. ResultSet.isLast() |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-07-07T21:46:08Z |
Jim,
"There is a way to implement JDBC spec while providing positioned
updates. Do not pre-fetch additional record during normal fetch.
Do it in ResultSet.isLast() method instead. While implementing
getCursorName() clearly state in its documentation that isLast()
method moves the physical cursor (while logical position remains the
same). Thats it."
I cannot say if it is correct (seems so, but I have to try). I will
check if we can add the code to JayBird. Then you can use it too, if
you would care to change your brilliant implementation into something
more ugly. :)
Best regards,
Roman
> I'm not going to presume to offer advice on how Firebird shouldThat was my idea too. :) But see text below.
> handle the problem. Netfrastructure, however, handles the
> ResultSet.isLast() method in approximately to following manner:
>
> throw new SQLException ("Not Yet Implemented")
>
> A more complete implementation would be:
>
> throw new SQLException ("Not Yet Implemented and Unlikely
> to be Be So")
> My reasoning is that positional updates have been part of SQL fromNickolay suggested interesting idea. Here it is:
> day 0 and are semantically significant while ResultSet.isLast() is
> recent, semantically unnecessary, and absurdly expensive to
> implement.
"There is a way to implement JDBC spec while providing positioned
updates. Do not pre-fetch additional record during normal fetch.
Do it in ResultSet.isLast() method instead. While implementing
getCursorName() clearly state in its documentation that isLast()
method moves the physical cursor (while logical position remains the
same). Thats it."
I cannot say if it is correct (seems so, but I have to try). I will
check if we can add the code to JayBird. Then you can use it too, if
you would care to change your brilliant implementation into something
more ugly. :)
Best regards,
Roman