cursor.rowcount ? not implemented as API specified?
<[email protected]> Wed, 28 Oct 2015 18:35:06 -0600 (GMT-06:00)
| Newsgroups | gmane.comp.python.db.cx-oracle |
|---|---|
| Message-ID | <21384161.1446078907149.JavaMail.root@wamui-mosaic.atl.sa.earthlink.net> |
Sorry, I guess my message earlier today was sort of duplicate - I've got a bit of lag here.
I have gone back to the list subscription page and changed my option to not digest, but I still seem to be getting daily digests?
Anyway, I am starting to use cx_Oracle...
Am I not understanding something? Documentation at https://www.python.org/dev/peps/pep-0249/#cursor-attributes says:
.rowcount
This read-only attribute specifies the number of rows that the last .execute*() produced (for DQL statements like SELECT ) or affected (for DML statements like UPDATE or INSERT ).
I have a variable in the interpreter 'cur' as my cursor...
>>> cur.execute('select * from isotope')
<__builtin__.OracleCursor on <cx_Oracle.Connection to some_user@some_sid>>
>>> cur.rowcount
0
>>> recs = cur.fetchall()
>>> recs[0]
('Co-55', 'Cobalt 55', None, None)
>>> len(recs)
389
>>> cur.rowcount
389
I think I should have access to 389 as cur.rowcount prior to doing any fetching from the cursor.
Is that not the right interpretation?
Thanks,
Erik Johnson
------------------------------------------------------------------------------