Skip to content

Commit f28e60d

Browse files
committed
fix: update set item support full expr in all db
1 parent f4ecd81 commit f28e60d

15 files changed

Lines changed: 21 additions & 14 deletions

pegjs/athena.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ set_list
14961496
* 'col1 = (col2 > 3)'
14971497
*/
14981498
set_item
1499-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
1499+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
15001500
return { column: c, value: v, table: tbl && tbl[0] };
15011501
}
15021502
/ tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ KW_VALUES __ LPAREN __ v:column_ref __ RPAREN {

pegjs/bigquery.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ set_list
552552
* 'col1 = (col2 > 3)'
553553
*/
554554
set_item
555-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
555+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
556556
return { column: c, value: v, table: tbl && tbl[0] };
557557
}
558558
/ tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ KW_VALUES __ LPAREN __ v:column_ref __ RPAREN {

pegjs/db2.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ set_list
14521452
* 'col1 = (col2 > 3)'
14531453
*/
14541454
set_item
1455-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
1455+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
14561456
return { column: c, value: v, table: tbl && tbl[0] };
14571457
}
14581458
/ tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ KW_VALUES __ LPAREN __ v:column_ref __ RPAREN {

pegjs/flinksql.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@ set_list
21772177
* 'col1 = (col2 > 3)'
21782178
*/
21792179
set_item
2180-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
2180+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
21812181
// => { column: ident; value: additive_expr; table?: ident;}
21822182
return { column: c, value: v, table: tbl && tbl[0] };
21832183
}

pegjs/hive.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ set_list
14371437
* 'col1 = (col2 > 3)'
14381438
*/
14391439
set_item
1440-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
1440+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
14411441
return { column: c, value: v, table: tbl && tbl[0] };
14421442
}
14431443
/ tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ KW_VALUES __ LPAREN __ v:column_ref __ RPAREN {

pegjs/mariadb.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2609,7 +2609,7 @@ set_list
26092609
* 'col1 = (col2 > 3)'
26102610
*/
26112611
set_item
2612-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
2612+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
26132613
return { column: c, value: v, table: tbl && tbl[0] };
26142614
}
26152615
/ tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ KW_VALUES __ LPAREN __ v:column_ref __ RPAREN {

pegjs/mysql.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ set_list
28782878
* 'col1 = (col2 > 3)'
28792879
*/
28802880
set_item
2881-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
2881+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
28822882
return { column: c, value: v, table: tbl && tbl[0] };
28832883
}
28842884
/ tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ KW_VALUES __ LPAREN __ v:column_ref __ RPAREN {

pegjs/noql.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3404,7 +3404,7 @@ set_list
34043404
* 'col1 = (col2 > 3)'
34053405
*/
34063406
set_item
3407-
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:additive_expr {
3407+
= tbl:(ident __ DOT)? __ c:column_without_kw __ '=' __ v:expr {
34083408
// => { column: ident; value: additive_expr; table?: ident;}
34093409
return { column: c, value: v, table: tbl && tbl[0] };
34103410
}

pegjs/postgresql.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4095,7 +4095,7 @@ set_list
40954095
* 'col1 = (col2 > 3)'
40964096
*/
40974097
set_item
4098-
= c:column_ref_array_index __ '=' __ v:additive_expr {
4098+
= c:column_ref_array_index __ '=' __ v:expr {
40994099
// => { column: ident; value: additive_expr; table?: ident;}
41004100
return { ...c, value: v };
41014101
}

pegjs/redshift.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3432,7 +3432,7 @@ set_list
34323432
* 'col1 = (col2 > 3)'
34333433
*/
34343434
set_item
3435-
= tbl:(ident __ DOT)? __ c:column_without_kw_type __ '=' __ v:additive_expr {
3435+
= tbl:(ident __ DOT)? __ c:column_without_kw_type __ '=' __ v:expr {
34363436
// => { column: ident; value: additive_expr; table?: ident;}
34373437
return { column: { expr: c }, value: v, table: tbl && tbl[0] };
34383438
}

0 commit comments

Comments
 (0)