When you have multiple whens within a merge query, the WhenNodes are joined with a comma. A minimal example of this can be seen in the following kysely playground: https://kyse.link/A9Ndr
The affected lines are as follows (with the comma after @1):
UPDATE SET
"first_name" = @1,
WHEN NOT MATCHED THEN
I know that this causes a syntax error within mssql, but am not as sure about the other dialects that kysely includes.
I'll make a draft PR shortly in attempt to fix this.
When you have multiple whens within a merge query, the
WhenNode
s are joined with a comma. A minimal example of this can be seen in the following kysely playground: https://kyse.link/A9NdrThe affected lines are as follows (with the comma after
@1
):I know that this causes a syntax error within mssql, but am not as sure about the other dialects that kysely includes.
I'll make a
draftPR shortly in attempt to fix this.