Title: updatecount => rowcount
Type: Severity: normal
Components: Library Versions: Jython 2.7
Status: open Resolution: remind
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: amak, bzimmer, fwierzbicki, jeff250, kzuberi, leouserz, zyasoft
Priority: normal Keywords: patch

Created on 2002-08-03.14:36:11 by bzimmer, last changed 2014-10-05.16:36:22 by zyasoft.

File name Uploaded Description Edit Remove
rowcount.patch jeff250, 2012-07-27.19:13:37 Proposed patch to fix rowcount semantics
msg703 (view) Author: Brian Zimmer (bzimmer) Date: 2002-08-03.14:36:11
The attribute .updatecount on cursor should be 
eliminated and the value of .rowcount should reflect both 
select and insert/update/delete statements.
msg704 (view) Author: Deleted User leouserz (leouserz) Date: 2006-12-21.19:27:58
it would be good to know what this is refering to.  Im going to take a wild guess that it has something to do with a database lib.

msg705 (view) Author: Khalid Zuberi (kzuberi) Date: 2006-12-23.22:11:58
I believe Brian contributed zxJDBC to jython. This bug is probably referring specifically to src/com/ziclix/python/sql/

- kz
msg6880 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.21:14:15
This bug is ten years old, the assignee no longer contributes to jython.

Assigning back to nobody.

Do we a path forward to resolving this issue? Leo? Khalid?
msg7338 (view) Author: Jeffrey Knockel (jeff250) Date: 2012-07-27.19:13:37
I'm interested in seeing this bug resolved.  I'm attaching a proposed patch.

My reasoning behind the patch is that if the last statement executed did *not* return a result set, then we want the rowcount to return the value of updatecount.  But if it didn't return a result set, then updatecount will be an integer >= 0, so we check for that and just return the updatecount.

Otherwise, if the last statement executed *did* return a result set, then we want to just return the rowcount value as before.  But if it did return a result set, then updatecount will be None, so in that case we return the rowcount value as before.

This patch preserves the old updatecount field behavior for now to give people relying on it time to transition.

Feedback welcome. :)
msg9065 (view) Author: Jim Baker (zyasoft) Date: 2014-10-05.16:36:21
To be fixed by replacing zxJDBC with jyjdbc

Target beta 4
Date User Action Args
2014-10-05 16:36:22zyasoftsetpriority: low -> normal
assignee: fwierzbicki
messages: + msg9065
nosy: + zyasoft
2013-02-19 18:54:30fwierzbickisetresolution: remind
versions: + Jython 2.7, - Deferred
2012-08-03 16:36:35fwierzbickisetnosy: + fwierzbicki
2012-07-27 19:13:37jeff250setfiles: + rowcount.patch
keywords: + patch
messages: + msg7338
nosy: + jeff250
2012-03-19 21:14:15amaksetassignee: bzimmer -> (no value)
messages: + msg6880
nosy: + amak
2009-03-14 01:07:04fwierzbickisetversions: + Deferred
2002-08-03 14:36:11bzimmercreate