@@ -322,7 +322,7 @@ export type create_column_definition = {
322322
323323export type column_constraint = { constraint : constraint_name ; } | { nullable : literal_null | literal_not_null ; default_val : default_expr ; } ;
324324
325- 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 ; } } ;
325+ export type collate_expr = { type : 'collate' ; keyword : 'collate' ; collate : { symbol : '=' | null ; name : ident_type ; } } ;
326326
327327export type column_format = { type : 'column_format' ; value : 'fixed' | 'dynamic' | 'default' ; } ;
328328
@@ -904,11 +904,9 @@ export type array_index_list = array_index[];
904904
905905export type expr_item = binary_column_expr & { array_index : array_index } ;
906906
907- export type cast_data_type = data_type & { quoted ?: string } ;
908-
909907export type column_item_suffix = [ { type : 'origin' ; value : string ; } , quoted_ident_type | column_ref ] ;
910908
911- 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 ; } ;
909+ 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 ; } ;
912910
913911
914912
@@ -1033,15 +1031,15 @@ export type window_specification = { name: null; partitionby: partition_by_claus
10331031
10341032export type window_specification_frameless = { name : null ; partitionby : partition_by_clause ; orderby : order_by_clause ; window_frame_clause : null } ;
10351033
1036- export type window_frame_clause = string ;
1034+ export type window_frame_clause = { type : 'row' ; expr : window_frame_following / window_frame_preceding } | binary_expr ;
10371035
10381036export type window_frame_following = string | window_frame_current_row ;
10391037
10401038export type window_frame_preceding = string | window_frame_current_row ;
10411039
1042- export type window_frame_current_row = { type : 'single_quote_string ' ; value : string } ;
1040+ export type window_frame_current_row = { type : 'origin ' ; value : string } ;
10431041
1044- export type window_frame_value = literal_string | literal_numeric ;
1042+ export type window_frame_value = { type : 'origin' ; value : string } | literal_numeric ;
10451043
10461044
10471045
@@ -1245,10 +1243,12 @@ export type column_ref = string_constants_escape | {
12451243 schema : string ;
12461244 table : string ;
12471245 column : column | '*' ;
1246+ collate ?: collate_expr ;
12481247 } | {
12491248 type : 'column_ref' ;
12501249 table : ident ;
12511250 column : column | '*' ;
1251+ collate ?: collate_expr ;
12521252 } ;
12531253
12541254export type column_ref_quoted = unknown ;
@@ -1369,12 +1369,14 @@ export type scalar_time_func = KW_CURRENT_DATE | KW_CURRENT_TIME | KW_CURRENT_TI
13691369
13701370export type scalar_func = scalar_time_func | KW_CURRENT_USER | KW_USER | KW_SESSION_USER | KW_SYSTEM_USER | "NTILE" ;
13711371
1372+ export type cast_data_type = data_type & { quoted ?: string } ;
1373+
13721374
13731375
13741376export type cast_double_colon = {
13751377 as ?: alias_clause ,
13761378 symbol : '::' | 'as' ,
1377- target : data_type ;
1379+ target : cast_data_type [ ] ;
13781380 } ;
13791381
13801382
0 commit comments