Skip to content

Commit 70ed937

Browse files
committed
Implement YDB specific concat
1 parent 1ce95c3 commit 70ed937

File tree

1 file changed

+4
-0
lines changed
  • ydb_sqlalchemy/sqlalchemy/compiler

1 file changed

+4
-0
lines changed

ydb_sqlalchemy/sqlalchemy/compiler/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ def visit_function(self, func, add_to_result_map=None, **kwargs):
307307
+ [name]
308308
) % {"expr": self.function_argspec(func, **kwargs)}
309309

310+
def visit_concat_func(self, func, **kwargs):
311+
arg_sql = ' || '.join(self.process(arg, **kwargs) for arg in func.clauses)
312+
return arg_sql
313+
310314
def _is_bound_to_nullable_column(self, bind_name: str) -> bool:
311315
if bind_name in self.column_keys and hasattr(self.compile_state, "dml_table"):
312316
if bind_name in self.compile_state.dml_table.c:

0 commit comments

Comments
 (0)