[cx-oracle-users] cursor.rowcount ? not implemented as API specified?
Brought to you by:
atuining
From: <ejo...@ea...> - 2015-10-29 00:35:19
|
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 |