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:
prasad83
2023-05-02 20:13:38 +05:30
committed by GitHub
parent 67aeb43116
commit c03e2bf950
+1 -1
View File
@@ -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)