Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 19308 invoked from network); 3 Mar 2006 15:38:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Mar 2006 15:38:34 -0000 Received: (qmail 7560 invoked by uid 500); 3 Mar 2006 15:39:19 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 7331 invoked by uid 500); 3 Mar 2006 15:39:18 -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: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 7315 invoked by uid 99); 3 Mar 2006 15:39:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 07:39:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.43] (HELO brmea-mail-2.sun.com) (192.18.98.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 07:39:16 -0800 Received: from phys-gadget-1 ([129.156.85.171]) by brmea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id k23Fcs8w007121 for ; Fri, 3 Mar 2006 08:38:55 -0700 (MST) Received: from conversion-daemon.gadget-mail1.uk.sun.com by gadget-mail1.uk.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IVK00J0163FEY@gadget-mail1.uk.sun.com> (original mail from Fernanda.Pizzorno@Sun.COM) for derby-dev@db.apache.org; Fri, 03 Mar 2006 15:38:54 +0000 (GMT) Received: from [129.159.112.237] (khepri25.Norway.Sun.COM [129.159.112.237]) by gadget-mail1.uk.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0IVK00B4Z64TZD@gadget-mail1.uk.sun.com> for derby-dev@db.apache.org; Fri, 03 Mar 2006 15:38:53 +0000 (GMT) Date: Fri, 03 Mar 2006 16:38:53 +0100 From: Fernanda Pizzorno Subject: Subject: Detectability of updates in DRDA To: Derby Development Message-id: <4408630D.5070900@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050930) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am going to start working on detectability for scrollable insensitive update result sets on the client driver and I was wondering if someone could answer to the following question posted by Dag: DERBY-775: Network client: Add support for scrollable, updatable, insensitive result sets [...] b) Detectability In the spec, we required that we be able to detect deletes and updates to the rows in the result set: deletesAreDetected(TYPE_SCROLL_INSENSITIVE) -> true updatesAreDetected(TYPE_SCROLL_INSENSITIVE) -> true (Since inserts are not visible, they can not be detectable, either). DRDA supports detection of holes in the following manner (quote, P. 656): "To present a static size and static ordering for the result table, the relational database may return a hole to the application that fetches an updated or deleted row in the result table. A hole in the result table occurs when there is a difference between the result table and the underlying base table. No data can be fetched from a hole, and the hole is manifested in the QRYDTA as a row consisting of a non-null SQLCARD and a null data group. When the current value of a row no longer satisfies the select-statement or statement-name, that row is visible in the cursor as an update hole , where the SQLCARD has a warning SQLSTATE of 02502. When a row of the result table is deleted from the underlying base table, the row is visible in the cursor as a delete hole , where the SQLCARD has a warning SQLSTATE of 02502." For deletes, the "delete hole" is exactly what we need to support ResultSet#rowDeleted(). For updates, is is not exactly what we want, since we do not intend to requalify a row after it has been updated (thereby possibly making it an "update hole"). On the other hand, when we update a row and let it remain in the result table, DRDA offers no means of conveying that the row has been changed in the sense of JDBC ResultSet#rowUpdated(), as far as I can tell. *Question 2*: Is there some way we can detect the latter without violating the protocol? One could imagine signalling this using another warning SQLSTATE. Would this be an acceptable tweaking of the DRDA? [...] Thanks in advance. Fernanda