Skip to content

Commit a430c10

Browse files
committed
SQLAlchemy: Forward dialect's returning_clause method to PGCompiler
1 parent b73081d commit a430c10

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/crate/client/sqlalchemy/compiler.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,10 @@ def visit_any(self, element, **kw):
224224
)
225225

226226
def returning_clause(self, stmt, returning_cols):
227-
columns = [
228-
self._label_select_column(None, c, True, False, {})
229-
for c in sa.sql.expression._select_iterables(returning_cols)
230-
]
231-
return "RETURNING " + ", ".join(columns)
227+
"""
228+
Generate RETURNING clause, PostgreSQL-compatible.
229+
"""
230+
return PGCompiler.returning_clause(self, stmt, returning_cols)
232231

233232
def visit_update(self, update_stmt, **kw):
234233
"""

0 commit comments

Comments
 (0)