Commit 1d931f1d authored by Denis Bilenko's avatar Denis Bilenko

examples/psycopg2_pool.py: make execute() return 'rowcount'

parent 297af289
......@@ -109,6 +109,7 @@ class DatabaseConnectionPool(object):
def execute(self, *args, **kwargs):
with self.cursor() as cursor:
cursor.execute(*args, **kwargs)
return cursor.rowcount
def fetchone(self, *args, **kwargs):
with self.cursor() as cursor:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment