@@ -73,7 +73,7 @@ export type create_view_stmt_t = {
73
73
recursive ?: 'recursive' ,
74
74
view : table_name ,
75
75
columns ?: column_list ,
76
- select : select_stmt_nake ,
76
+ select : select_stmt ,
77
77
with_options ?: with_view_options ,
78
78
with ?: string ,
79
79
}
@@ -316,17 +316,17 @@ export type create_column_definition = {
316
316
resource : 'column' ;
317
317
} ;
318
318
319
- export type column_constraint = { nullable : literal_null | literal_not_null ; default_val : default_expr ; } ;
319
+ export type column_constraint = { constraint : constraint_name ; } | { nullable : literal_null | literal_not_null ; default_val : default_expr ; } ;
320
320
321
321
export type collate_expr = { type : 'collate' ; keyword : 'collate' ; collate : { symbol : '=' ; name : ident_type ; value : ident_type ; } } | { type : 'collate' ; keyword : 'collate' ; collate : { symbol : '=' | null ; name : ident_type ; } } ;
322
322
323
323
export type column_format = { type : 'column_format' ; value : 'fixed' | 'dynamic' | 'default' ; } ;
324
324
325
325
export type storage = { type : 'storage' ; value : 'disk' | 'memory' } ;
326
326
327
- export type default_arg_expr = { type : 'default' ; keyword : string , value : literal | expr ; } ;
327
+ export type default_arg_expr = { type : 'default' ; keyword : string , value : expr ; } ;
328
328
329
- export type default_expr = { type : 'default' ; value : literal | expr ; } ;
329
+ export type default_expr = { type : 'default' ; value : expr ; } ;
330
330
331
331
export type drop_index_opt = ( ALTER_ALGORITHM | ALTER_LOCK ) [ ] ;
332
332
@@ -876,7 +876,7 @@ export type expr_item = binary_column_expr & { array_index: array_index };
876
876
877
877
export type cast_data_type = data_type & { quoted ?: string } ;
878
878
879
- export type column_list_item = { expr : expr ; as : null ; } | { type : 'cast' ; expr : expr ; symbol : '::' ; target : cast_data_type ; as ?: null ; jsonb ?: jsonb_or_json_op_right [ ] ; } | { expr : column_ref ; as : null ; } | { type : 'expr' ; expr : expr ; as ?: alias_clause ; } ;
879
+ export type column_list_item = { expr : expr ; as : null ; } | { type : 'cast' ; expr : expr ; symbol : '::' ; target : cast_data_type ; as ?: null ; } | { expr : column_ref ; as : null ; } | { type : 'expr' ; expr : expr ; as ?: alias_clause ; } ;
880
880
881
881
882
882
@@ -1152,7 +1152,7 @@ export type exists_expr = unary_expr;
1152
1152
1153
1153
export type exists_op = 'NOT EXISTS' | KW_EXISTS ;
1154
1154
1155
- export type comparison_op_right = arithmetic_op_right | in_op_right | between_op_right | is_op_right | like_op_right | jsonb_or_json_op_right | regex_op_right ;
1155
+ export type comparison_op_right = arithmetic_op_right | in_op_right | between_op_right | is_op_right | like_op_right | regex_op_right ;
1156
1156
1157
1157
export type arithmetic_op_right = { type : 'arithmetic' ; tail : any } ;
1158
1158
@@ -1184,8 +1184,6 @@ export type like_op_right = { op: like_op; right: (literal | comparison_expr) &
1184
1184
1185
1185
export type in_op_right = { op : in_op ; right : expr_list | var_decl | literal_string ; } ;
1186
1186
1187
- export type jsonb_or_json_op_right = { op : string ; right : { type : 'expr' ; expr : expr_item } } ;
1188
-
1189
1187
export type additive_expr = binary_expr ;
1190
1188
1191
1189
export type additive_operator = "+" | "-" ;
@@ -1198,10 +1196,12 @@ export type column_ref_array_index = column_ref;
1198
1196
1199
1197
export type primary = cast_expr | or_and_where_expr | var_decl | { type : 'origin' ; value : string ; } ;
1200
1198
1201
- export type unary_expr_or_primary = primary | unary_expr ;
1199
+ export type unary_expr_or_primary = jsonb_expr | unary_expr ;
1202
1200
1203
1201
export type unary_operator = "!" | "-" | "+" | "~" ;
1204
1202
1203
+ export type jsonb_expr = binary_expr | primary | binary_expr ;
1204
+
1205
1205
export type string_constants_escape = { type : 'origin' ; value : string ; } ;
1206
1206
1207
1207
@@ -1213,7 +1213,6 @@ export type column_ref = string_constants_escape | {
1213
1213
schema : string ;
1214
1214
table : string ;
1215
1215
column : column | '*' ;
1216
- jsonb ?: jsonb_or_json_op_right [ ] ;
1217
1216
} | {
1218
1217
type : 'column_ref' ;
1219
1218
table : ident ;
@@ -1342,7 +1341,6 @@ export type cast_double_colon = {
1342
1341
as ?: alias_clause ,
1343
1342
symbol : '::' | 'as' ,
1344
1343
target : data_type ;
1345
- jsonb ?: jsonb_or_json_op_right [ ] ;
1346
1344
} ;
1347
1345
1348
1346
0 commit comments