Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 33651 invoked from network); 5 Jan 2005 09:41:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Jan 2005 09:41:31 -0000 Received: (qmail 82776 invoked by uid 500); 5 Jan 2005 09:41:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 82743 invoked by uid 500); 5 Jan 2005 09:41:28 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 82723 invoked by uid 99); 5 Jan 2005 09:41:28 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from brmea-mail-3.Sun.COM (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 05 Jan 2005 01:41:24 -0800 Received: from phys-biff-2 ([129.158.227.37]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id j059enW4005411 for ; Wed, 5 Jan 2005 02:41:22 -0700 (MST) Received: from conversion-daemon.biff-mail1.india.sun.com by biff-mail1.india.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0I9U00F0187D98@biff-mail1.india.sun.com> (original mail from Amit.Handa@Sun.COM) for derby-dev@db.apache.org; Wed, 05 Jan 2005 15:11:14 +0530 (IST) Received: from Sun.COM (javasoft18.India.Sun.COM [129.158.229.190]) by biff-mail1.india.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0I9U00GCO88QUT@biff-mail1.india.sun.com> for derby-dev@db.apache.org; Wed, 05 Jan 2005 15:11:14 +0530 (IST) Date: Wed, 05 Jan 2005 15:10:26 +0530 From: Amit Handa Subject: Re: Position of the ResultSet after updateRow? In-reply-to: <41DBB248.5080205@Sun.COM> To: Derby Development Reply-to: Amit.Handa@Sun.COM Message-id: <41DBB60A.4000509@Sun.COM> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20040414 References: <41DABA6C.7F334B5C@Remulak.Net> <41DAE0A6.3030808@debrunners.com> <41DBB248.5080205@Sun.COM> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Amit Handa wrote: > First the Spec does not mandate that > a ResultSet should see it's own updates or inserts. > (but the changes should be reflected to the database irrespective) > > Secondly if the DBMS or JDBC drivers > support this(through DatabaseMetaData.ownXXXAreVisible() ), > it should. > > >>>My question is about ResultSet position after updateRow. An updateRow >>>can make the row not qualify for the original select query. > Oops...re phrasing below para It should qualify irrespective of whether it satisfies the ResultSet query from which it was populated or not or the data should not be allowed to enter the ResultSet. > I agree with Dan it will be part of ResultSet > even though subsequent executions may not fetch that row. > > thanks, > Amit > > Daniel John Debrunner wrote: > >>-----BEGIN PGP SIGNED MESSAGE----- >>Hash: SHA1 >> >>Mamta Satoor wrote: >> >> >> >>>Hi, >>> >>>Some of you might recall the discussion on where the ResultSet should be >>>positioned after deleteRow and the conclusion that it will be placed right >>>before the next row in the ResultSet. >>> >>>My question is about ResultSet position after updateRow. An updateRow >>>can make the row not qualify for the original select query. >> >> >>Can anyone from the Sun JDBC team comment on how updateRow() and >>insertRow() are intended to behave when they modify or create rows that >>would not qualify according to the SQL query that created the ResultSet? >> > > >>Reading between the lines in the JDBC book seems to imply that the >>updated or inserted row are always part of the ResultSet, even though a >>subsequent execution would not return that row. >>I can see this approach makes sense for going through a list of items in >>an application. Say all items with a price <= 10.0, and modifying the >>price of some to be > 10.0, as a user I might expect to see the newly >>modified row remain in my view, rather than just disappear. >> >>Dan. >> >>-----BEGIN PGP SIGNATURE----- >>Version: GnuPG v1.2.5 (MingW32) >>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >>iD8DBQFB2uCmIv0S4qsbfuQRAtagAJwOkXd7mu0nLteBa26X4tqGY324RgCdE8ld >>BXWcUymBmC0cK0Yh9dwPE84= >>=YSr2 >>-----END PGP SIGNATURE----- >> > > > > > > -- Regards, Amit Handa, JDBC Engineering, Java Web Services. Sun Microsystems Inc.