DB API specification of .rowcount and/or execute

andychambers2002 at yahoo.co.uk andychambers2002 at yahoo.co.uk
Mon Nov 14 16:15:21 CET 2005


Hi,

Should execute() be allowed to execute multiple operations?

e.g.

from dbi import *

conn = connect(database="test")
curs = conn.cursor()
curs.execute("""
                       INSERT INTO test_table VALUES (1, 'one');
                       INSERT INTO test_table VALUES(2, 'two');
                   """)

If so, then given this execution should rowcount contain the value 2?

What if both a select statement and an insert/update statement exist in
a single call to execute?

Perhaps only the rows affected/returned by the last operation in a
given execute() should be given by rowcount?




More information about the Python-list mailing list