@@ -900,6 +900,8 @@ export type expr_item = binary_column_expr & { array_index: array_index };
900900
901901export type cast_data_type = data_type & { quoted ?: string } ;
902902
903+ export type column_item_suffix = [ { type : 'origin' ; value : string ; } , quoted_ident_type ] ;
904+
903905export 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 ; } ;
904906
905907
@@ -1119,7 +1121,7 @@ export type value_list = value_item[];
11191121
11201122export type value_item = expr_list ;
11211123
1122- export type expr_list = { type : 'expr_list' ; value : expr [ ] } ;
1124+ export type expr_list = { type : 'expr_list' ; value : expr [ ] ; parentheses ?: boolean ; separator ?: string ; } ;
11231125
11241126export type interval_expr = { type : 'interval' , expr : expr ; unit : interval_unit ; } ;
11251127
@@ -1349,7 +1351,9 @@ export type trim_func_clause = { type: 'function'; name: proc_func_name; args: e
13491351
13501352export type tablefunc_clause = { type : 'tablefunc' ; name : proc_func_name ; args : expr_list ; as : func_call } ;
13511353
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 ; } ;
13531357
13541358export type extract_filed = 'string' ;
13551359
@@ -1870,7 +1874,9 @@ export type proc_stmt = AstStatement<proc_stmt_t>;
18701874
18711875export type assign_stmt_list = assign_stmt [ ] ;
18721876
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 ; } ;
18741880
18751881export type return_stmt = { type : 'return' ; expr : proc_expr ; } ;
18761882
0 commit comments