@@ -202,16 +202,20 @@ export type create_sequence_definition = sequence_definition_increment | sequenc
202
202
203
203
export type create_sequence_definition_list = create_sequence_definition [ ] ;
204
204
205
+ export type include_column = { type : 'include' , keyword : 'include' , columns : column_list } ;
206
+
205
207
export interface create_index_stmt_node {
206
208
type : 'create' ;
207
209
index_type ?: 'unique' ;
210
+ if_not_exists : if_not_exists_stmt ;
208
211
keyword : 'index' ;
209
212
concurrently ?: 'concurrently' ;
210
213
index : string ;
211
214
on_kw : string ;
212
215
table : table_name ;
213
216
index_using ?: index_type ;
214
217
index_columns : column_order [ ] ;
218
+ include ?: column_list_items ;
215
219
with ?: index_option [ ] ;
216
220
with_before_where : true ;
217
221
tablespace ?: { type : 'origin' ; value : string ; }
@@ -413,7 +417,7 @@ export type ALTER_ADD_COLUMN = {
413
417
action : 'add' ;
414
418
keyword : KW_COLUMN ;
415
419
resource : 'column' ;
416
- if_not_exists : ife ;
420
+ if_not_exists : if_not_exists_stmt ;
417
421
type : 'alter' ;
418
422
} & create_column_definition ; ;
419
423
@@ -856,7 +860,9 @@ export interface select_stmt_node extends select_stmt_nake {
856
860
parentheses : true ;
857
861
}
858
862
859
- export type select_stmt = { type : 'select' ; } | select_stmt_nake | select_stmt_node ;
863
+ export type select_stmt_parentheses = select_stmt_node ;
864
+
865
+ export type select_stmt = { type : 'select' ; } | select_stmt_nake | select_stmt_parentheses ;
860
866
861
867
export type with_clause = cte_definition [ ] | [ cte_definition & { recursive : true ; } ] ;
862
868
@@ -900,7 +906,7 @@ export type expr_item = binary_column_expr & { array_index: array_index };
900
906
901
907
export type cast_data_type = data_type & { quoted ?: string } ;
902
908
903
- export type column_item_suffix = [ { type : 'origin' ; value : string ; } , quoted_ident_type ] ;
909
+ export type column_item_suffix = [ { type : 'origin' ; value : string ; } , quoted_ident_type | column_ref ] ;
904
910
905
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 ; } ;
906
912
0 commit comments