Skip to content

Commit 4c35fd4

Browse files
committed
fix(sqlserver): terminate MERGE statement with required trailing semicolon
1 parent e3f4d5b commit 4c35fd4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/rhosocial/activerecord/backend/impl/sqlserver

‎src/rhosocial/activerecord/backend/impl/sqlserver/dialect.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,8 @@ def format_merge_statement(self, expr: "MergeExpression") -> Tuple[str, tuple]:
15551555
parts.append(output_sql)
15561556
all_params.extend(output_params)
15571557

1558-
return " ".join(parts), tuple(all_params)
1558+
# T-SQL requires a MERGE statement to be terminated by a semi-colon.
1559+
return " ".join(parts) + ";", tuple(all_params)
15591560

15601561
def format_set_transaction(self, expr: "SetTransactionExpression") -> Tuple[str, tuple]:
15611562
"""Format SET TRANSACTION for SQL Server.

0 commit comments

Comments
 (0)