@@ -900,6 +900,8 @@ export type expr_item = binary_column_expr & { array_index: array_index };
900
900
901
901
export type cast_data_type = data_type & { quoted ?: string } ;
902
902
903
+ export type column_item_suffix = [ { type : 'origin' ; value : string ; } , quoted_ident_type ] ;
904
+
903
905
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 ; } ;
904
906
905
907
@@ -1119,7 +1121,7 @@ export type value_list = value_item[];
1119
1121
1120
1122
export type value_item = expr_list ;
1121
1123
1122
- export type expr_list = { type : 'expr_list' ; value : expr [ ] } ;
1124
+ export type expr_list = { type : 'expr_list' ; value : expr [ ] ; parentheses ?: boolean ; separator ?: string ; } ;
1123
1125
1124
1126
export type interval_expr = { type : 'interval' , expr : expr ; unit : interval_unit ; } ;
1125
1127
@@ -1349,7 +1351,9 @@ export type trim_func_clause = { type: 'function'; name: proc_func_name; args: e
1349
1351
1350
1352
export type tablefunc_clause = { type : 'tablefunc' ; name : proc_func_name ; args : expr_list ; as : func_call } ;
1351
1353
1352
- export type func_call = trim_func_clause | tablefunc_clause | { type : 'function' ; name : proc_func_name ; args : expr_list ; suffix : literal_string ; } | { type : 'function' ; name : proc_func_name ; args : expr_list ; over ?: over_partition ; } | extract_func | { type : 'function' ; name : proc_func_name ; over ?: on_update_current_timestamp ; } | { type : 'function' ; name : proc_func_name ; args : expr_list ; } ;
1354
+ export type substring_funcs_clause = { type : 'function' ; name : 'substring' ; args : expr_list ; } ;
1355
+
1356
+ export type func_call = trim_func_clause | tablefunc_clause | substring_funcs_clause | { type : 'function' ; name : proc_func_name ; args : expr_list ; suffix : literal_string ; } | { type : 'function' ; name : proc_func_name ; args : expr_list ; over ?: over_partition ; } | extract_func | { type : 'function' ; name : proc_func_name ; over ?: on_update_current_timestamp ; } | { type : 'function' ; name : proc_func_name ; args : expr_list ; } ;
1353
1357
1354
1358
export type extract_filed = 'string' ;
1355
1359
@@ -1870,7 +1874,9 @@ export type proc_stmt = AstStatement<proc_stmt_t>;
1870
1874
1871
1875
export type assign_stmt_list = assign_stmt [ ] ;
1872
1876
1873
- export type assign_stmt = { type : 'assign' ; left : var_decl | without_prefix_var_decl ; symbol : ':=' | '=' ; right : proc_expr ; } ;
1877
+ export type assign_stmt_timezone = { type : 'assign' ; left : expr_list ; symbol : 'to' ; right : interval_unit ; } | { type : 'assign' ; left : literal_string ; symbol ?: 'to' ; right : literal ; } ;
1878
+
1879
+ export type assign_stmt = assign_stmt_timezone | { type : 'assign' ; left : var_decl | without_prefix_var_decl ; symbol : ':=' | '=' ; right : proc_expr ; } ;
1874
1880
1875
1881
export type return_stmt = { type : 'return' ; expr : proc_expr ; } ;
1876
1882
0 commit comments