Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
zijianll opened this issue Mar 14, 2020 · 1 comment
Open

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

zijianll opened this issue Mar 14, 2020 · 1 comment

Comments

@zijianll
Copy link

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
Copy link

dohongdayi commented Feb 28, 2022

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants