Skip to content

Commit 5bd8089

Browse files
committed
Support := assignments inside RAISE .. USING clause
1 parent 49f9b88 commit 5bd8089

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/syntax/procedural_language.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ export const proceduralLanguageMap: CstToDocMap<AllProceduralNodes> = {
201201
raise_level: (print) => print("levelKw"),
202202
raise_using_clause: (print) =>
203203
group([print("usingKw"), indent([line, print("options")])]),
204-
raise_option_element: (print) => [print("nameKw"), " = ", print("value")],
204+
raise_option_element: (print) =>
205+
group(print.spaced(["nameKw", "operator", "value"])),
205206
// ASSERT
206207
assert_stmt: (print) =>
207208
group(print.spaced(["assertKw", "condition", "message"])),

test/proc/raise.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe("raise", () => {
2929
it(`formats RAISE with level and USING clause`, async () => {
3030
await testPlpgsql(dedent`
3131
RAISE WARNING index_out_of_range
32-
USING MESSAGE = 'Index is out of range', HINT = 'Whatever'
32+
USING MESSAGE = 'Index is out of range', HINT := 'Whatever'
3333
`);
3434
});
3535

0 commit comments

Comments
 (0)