This repository was archived by the owner on Jul 15, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +507
-497
lines changed
Expand file tree Collapse file tree 2 files changed +507
-497
lines changed Original file line number Diff line number Diff line change @@ -466,10 +466,10 @@ expression_wrapped
466466
467467expression_recur
468468 = expression_wrapped
469+ / expression_exists
469470 / expression_cast
470471 / expression_case
471472 / expression_raise
472- / expression_exists
473473 / expression_root
474474
475475expression_unary_collate
@@ -500,7 +500,7 @@ expression_unary_op
500500 = sym_tilde
501501 / sym_minus
502502 / sym_plus
503- / expression_is_not
503+ / $( expression_is_not ! EXISTS )
504504
505505expression_collate "COLLATE Expression"
506506 = c :( column_collate ) {
@@ -1815,7 +1815,12 @@ create_core_ine "IF NOT EXISTS Modifier"
18151815 return {
18161816 ' condition' : makeArray ({
18171817 ' type' : ' condition' ,
1818- ' condition' : foldStringKey ([ i, n, e ])
1818+ ' variant' : keyNode (i),
1819+ ' condition' : {
1820+ ' type' : ' expression' ,
1821+ ' variant' : keyNode (e),
1822+ ' operator' : foldString ([ n, e ])
1823+ }
18191824 })
18201825 };
18211826 }
@@ -2539,7 +2544,7 @@ stmt_drop "DROP Statement"
25392544 }
25402545
25412546drop_start "DROP Keyword"
2542- = s :( DROP ) o t :( drop_types ) i :( drop_conditions )?
2547+ = s :( DROP ) o t :( drop_types ) i :( drop_ie )?
25432548 {
25442549 return Object .assign ({
25452550 ' variant' : keyNode (s),
@@ -2552,20 +2557,19 @@ drop_types "DROP Type"
25522557 = t :( TABLE / INDEX / TRIGGER / VIEW ) o
25532558 { return keyNode (t); }
25542559
2555- drop_conditions
2556- = c :( drop_ie )
2557- {
2558- return {
2559- ' condition' : makeArray (c)
2560- };
2561- }
2562-
25632560drop_ie "IF EXISTS Keyword"
25642561 = i :( IF ) o e :( EXISTS ) o
25652562 {
25662563 return {
2567- ' type' : ' condition' ,
2568- ' condition' : foldStringKey ([ i, e ])
2564+ ' condition' : [{
2565+ ' type' : ' condition' ,
2566+ ' variant' : keyNode (i),
2567+ ' condition' : {
2568+ ' type' : ' expression' ,
2569+ ' variant' : keyNode (e),
2570+ ' operator' : keyNode (e)
2571+ }
2572+ }]
25692573 };
25702574 }
25712575
You can’t perform that action at this time.
0 commit comments