mirror of
https://github.com/kennethreitz/records.git
synced 2026-06-05 23:00:20 +00:00
Compatible with SQLAlchemy 1.4.*
Compatible with SQLAlchemy 1.4.*
This commit is contained in:
+4
-1
@@ -360,7 +360,10 @@ class Connection(object):
|
||||
cursor = self._conn.execute(text(query), **params) # TODO: PARAMS GO HERE
|
||||
|
||||
# Row-by-row Record generator.
|
||||
row_gen = (Record(cursor.keys(), row) for row in cursor)
|
||||
row_gen = iter(Record([], []))
|
||||
|
||||
if cursor.returns_rows:
|
||||
row_gen = (Record(cursor.keys(), row) for row in cursor)
|
||||
|
||||
# Convert psycopg2 results to RecordCollection.
|
||||
results = RecordCollection(row_gen)
|
||||
|
||||
Reference in New Issue
Block a user