Bugs item #1573854, was opened at 2006-10-10 01:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1573854&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Seo Sanghyeon (sanxiyn)
Assigned to: Nobody/Anonymous (nobody)
Summary: sqlite3 documentation on rowcount is contradictory

Initial Comment:
http://docs.python.org/lib/sqlite3-Cursor-Objects.html
says:

----
For SELECT statements, rowcount is always None because
we cannot determine the number of rows a query produced
until all rows were fetched.

As required by the Python DB API Spec, the rowcount
attribute "is -1 in case no executeXX() has been
performed on the cursor or the rowcount of the last
operation is not determinable by the interface".
----

Clearly, both can't be true. My experiment showed that
rowcount is set to -1, not None. I suggest rewriting
this to something like:

----
As required by the Python DB API Spec, the rowcount
attribute "is -1 in case no executeXX() has been
performed on the cursor or the rowcount of the last
operation is not determinable by the interface".

This includes SELECT statements, because we cannot
determine the number of rows a query produced until all
rows are fetched.
----

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1573854&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to