kennethreitz / records

SQL for Humans™
https://pypi.python.org/pypi/records/
ISC License
7.14k stars 570 forks source link

records.Database.query can't return affected rowcounts? #192

Open zijianll opened 4 years ago

zijianll commented 4 years ago

records.Database.query can't return affected rowcounts? How can I do when I need to get affected rowcounts after executing update or delete commands?

dohongdayi commented 2 years ago

def execute(db, sql, kwargs):  with db.get_connection() as conn:   return conn._conn.execute(text(sql), kwargs).rowcount