Skip to content

Commit

Permalink
Build deno [autogenerated commit]
Browse files Browse the repository at this point in the history
  • Loading branch information
oguimbal committed Jan 8, 2024
1 parent 899f91e commit 2c84d4c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .deno/syntax/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ export interface ExprWhen extends PGNode {
export interface SetGlobalStatement extends PGNode {
type: 'set';
variable: Name;
scope?: string;
set: SetGlobalValue;
}
export interface SetTimezone extends PGNode {
Expand Down
12 changes: 9 additions & 3 deletions .deno/syntax/main.ne.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ const grammar: Grammar = {
{"name": "kw_hour", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('hour')},
{"name": "kw_minute", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('minute')},
{"name": "kw_local", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('local')},
{"name": "kw_session", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('session')},
{"name": "kw_prepare", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('prepare')},
{"name": "kw_deallocate", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('deallocate')},
{"name": "kw_raise", "symbols": [(lexerAny.has("word") ? {type: "word"} : word)], "postprocess": notReservedKw('raise')},
Expand Down Expand Up @@ -1976,12 +1977,17 @@ const grammar: Grammar = {
{"name": "simplestatements_set_names", "symbols": ["kw_names", "simplestatements_set_names_val"], "postprocess": x => track(x, { type: 'set names', to: x[1] })},
{"name": "simplestatements_set_names_val$subexpression$1", "symbols": ["string"]},
{"name": "simplestatements_set_names_val", "symbols": ["simplestatements_set_names_val$subexpression$1"], "postprocess": x => track(x, { type: 'value', value: unwrap(x[0]) })},
{"name": "simplestatements_set_simple$ebnf$1$subexpression$1", "symbols": ["kw_local"]},
{"name": "simplestatements_set_simple$ebnf$1$subexpression$1", "symbols": ["kw_session"]},
{"name": "simplestatements_set_simple$ebnf$1", "symbols": ["simplestatements_set_simple$ebnf$1$subexpression$1"], "postprocess": id},
{"name": "simplestatements_set_simple$ebnf$1", "symbols": [], "postprocess": () => null},
{"name": "simplestatements_set_simple$subexpression$1", "symbols": [(lexerAny.has("op_eq") ? {type: "op_eq"} : op_eq)]},
{"name": "simplestatements_set_simple$subexpression$1", "symbols": [(lexerAny.has("kw_to") ? {type: "kw_to"} : kw_to)]},
{"name": "simplestatements_set_simple", "symbols": ["ident", "simplestatements_set_simple$subexpression$1", "simplestatements_set_val"], "postprocess": x => track(x, {
{"name": "simplestatements_set_simple", "symbols": ["simplestatements_set_simple$ebnf$1", "ident", "simplestatements_set_simple$subexpression$1", "simplestatements_set_val"], "postprocess": x => track(x, {
type: 'set',
variable: asName(x[0]),
set: unbox(x[2]),
variable: asName(x[1]),
scope: unwrap(x[0])?.toLowerCase(),
set: unbox(x[3]),
}) },
{"name": "simplestatements_set_val", "symbols": ["simplestatements_set_val_raw"], "postprocess": unwrap},
{"name": "simplestatements_set_val", "symbols": [(lexerAny.has("kw_default") ? {type: "kw_default"} : kw_default)], "postprocess": x => track(x, {type: 'default'})},
Expand Down
6 changes: 5 additions & 1 deletion .deno/to-sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,11 @@ const visitor = astVisitor<IAstFullVisitor>(m => ({


setGlobal: g => {
ret.push('SET ', name(g.variable), ' = ');
ret.push('SET ')
if (g.scope) {
ret.push(g.scope.toUpperCase() + ' ');
}
ret.push(name(g.variable), ' = ');
visitSetVal(g.set);
},

Expand Down

0 comments on commit 2c84d4c

Please sign in to comment.