mirror of
https://github.com/kennethreitz/records.git
synced 2026-06-05 14:50:18 +00:00
Fixed query execute with params for Sqlachemy 2.0
Sqlachemy 2.x expects parameters be bound to statement (=text(query))
This commit is contained in:
+1
-1
@@ -357,7 +357,7 @@ class Connection(object):
|
||||
"""
|
||||
|
||||
# Execute the given query.
|
||||
cursor = self._conn.execute(text(query), **params) # TODO: PARAMS GO HERE
|
||||
cursor = self._conn.execute(text(query).bindparams(**params)) # TODO: PARAMS GO HERE
|
||||
|
||||
# Row-by-row Record generator.
|
||||
row_gen = (Record(cursor.keys(), row) for row in cursor)
|
||||
|
||||
Reference in New Issue
Block a user