db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [VOTE][PATCH]delete from the resultset using JDBC 2.0 UpdatableResultset APIs
Date Fri, 10 Dec 2004 22:46:10 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mamta Satoor wrote:

>
> Hi Dan,
>
> Thanks for taking the time to do the review. Answers to your questions
> 1)The tutorial book says that ResultSet.rowDeleted determines whether *the
> current row* in this ResultSet object has been deleted. Going on this
> information, I will leave my code for rowDeleted as is. But if this seems
> incorrect to anyone, please let me know.
>
> 2)As for the next set of 3 questions,
> a)If ResultSetMetaData indicates that one/more columns are not
nullable, then
> what should happen to those columns when the driver is trying to make a
> delete row hole with null values for all the columns in the row?
> b)Where should be ResultSet positioned after a successful deleteRow call?
> c)What should happen if deleteRow is called more than once on the same
row?
>
> I haven't found anything in the JDBC docs or in the Tutorial book about
> what a JDBC driver should do in above sceanrios. I would appreciate
> any feedback from the community on these 3 questions.

An alternate approach would be to return false for
DatabaseMetaData.deletesAreDetected().

Then:
	1) becomes a non-issue.
	2a) becomes a non-issue
	2b) the result set would be positioned before the next row
	2c) can't happen.

I think deletesAreDetected() returning true is only useful for
scrollable result sets, which you are not supporting. And the
deletesAreDetected() method does take a result set type, so in the
future scrollable results sets could support holes, while forward only
did not.

Any reason you selected to detect deletes?

Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBuicyIv0S4qsbfuQRAiSIAJwN2Hxf9NvvPmn3VMRD27XvEN/I/gCZAemA
MrlA7KER8TBpgJ9qmQcxXHM=
=nI/C
-----END PGP SIGNATURE-----


Mime
View raw message