[Zope-DB] reading rowcount after calling zsql
Dieter Maurer
dieter@handshake.de
Wed, 24 Jul 2002 22:07:56 +0200
Werner Hennrich writes:
> ...
> I'm looking for a way to obtain the number of records; my rdbms (postgresql)
> dosn't have a construct to query this, but the db-driver in zope (it is
> DB-API 2.0 compliant) can tell via 'driver.cursor().rowcount()' - but how
> can I get the cursor-object of a ZSQL-Method?
This is a low level implementation detail, undocumented, different
for different database adapters...
You know what this means.
ZSQL methods do not have a cursor. The cursor is maintained by the
DA instance. Look at the code of the DA[s] you are interested in.
Dieter