From 3f88e57046756471e4d9ce4245163113dbf838eb Mon Sep 17 00:00:00 2001 From: Olivier Guimbal Date: Thu, 5 May 2022 09:37:11 +0200 Subject: [PATCH] Build deno [autogenerated commit] --- .deno/syntax/ast.ts | 2 +- .deno/syntax/main.ne.ts | 6 ++++-- .deno/to-sql.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.deno/syntax/ast.ts b/.deno/syntax/ast.ts index 188fa03..953fcf8 100644 --- a/.deno/syntax/ast.ts +++ b/.deno/syntax/ast.ts @@ -195,7 +195,7 @@ export interface DropTableStatement extends PGNode { type: 'drop table'; name: QName; ifExists?: boolean; - cascade?: boolean; + cascade?: 'cascade' | 'restrict'; } export interface DropSequenceStatement extends PGNode { diff --git a/.deno/syntax/main.ne.ts b/.deno/syntax/main.ne.ts index c38e835..ffa9f0d 100644 --- a/.deno/syntax/main.ne.ts +++ b/.deno/syntax/main.ne.ts @@ -2340,7 +2340,9 @@ const grammar: Grammar = { {"name": "alter_sequence_option", "symbols": ["kw_restart", "alter_sequence_option$ebnf$1"], "postprocess": x => box(x, ['restart', typeof unbox(x[1]) === 'number' ? unbox(x[1]) : true])}, {"name": "drop_statement$ebnf$1", "symbols": ["kw_ifexists"], "postprocess": id}, {"name": "drop_statement$ebnf$1", "symbols": [], "postprocess": () => null}, - {"name": "drop_statement$ebnf$2", "symbols": ["kw_cascade"], "postprocess": id}, + {"name": "drop_statement$ebnf$2$subexpression$1", "symbols": ["kw_cascade"]}, + {"name": "drop_statement$ebnf$2$subexpression$1", "symbols": ["kw_restrict"]}, + {"name": "drop_statement$ebnf$2", "symbols": ["drop_statement$ebnf$2$subexpression$1"], "postprocess": id}, {"name": "drop_statement$ebnf$2", "symbols": [], "postprocess": () => null}, {"name": "drop_statement", "symbols": ["kw_drop", "drop_what", "drop_statement$ebnf$1", "qualified_name", "drop_statement$ebnf$2"], "postprocess": (x: any, rej: any) => { const v = unwrap(x[1]); @@ -2348,7 +2350,7 @@ const grammar: Grammar = { ...v, ... x[2] && {ifExists: true}, name: unwrap(x[3]), - ... x[4] && {cascade: true}, + ... x[4] && {cascade: toStr(x[4]) }, }); }}, {"name": "drop_what", "symbols": [(lexerAny.has("kw_table") ? {type: "kw_table"} : kw_table)], "postprocess": x => track(x, { type: 'drop table' })}, diff --git a/.deno/to-sql.ts b/.deno/to-sql.ts index 43a4b8c..0c3b630 100644 --- a/.deno/to-sql.ts +++ b/.deno/to-sql.ts @@ -626,7 +626,7 @@ const visitor = astVisitor(m => ({ } m.tableRef(val.name); if (val.cascade) { - ret.push(' CASCADE '); + ret.push(' ', val.cascade, ' '); } }, dropIndex: val => {