@@ -132,7 +132,6 @@ export type column_order_list = column_order[];
132132
133133
134134export type column_order = {
135- column : expr ;
136135 collate : collate_expr ;
137136 opclass : ident ;
138137 order : 'asc' | 'desc' ;
@@ -200,10 +199,10 @@ export interface drop_stmt_node {
200199
201200export interface drop_index_stmt_node {
202201 type : 'drop' ;
202+ prefix ?: 'CONCURRENTLY' ;
203203 keyword : string ;
204204 name : column_ref ;
205- table : table_name ;
206- options ?: drop_index_opt ;
205+ options ?: 'cascade' | 'restrict' ;
207206 }
208207
209208export type drop_stmt = AstStatement < drop_stmt_node > | AstStatement < drop_index_stmt_node > ;
@@ -233,7 +232,7 @@ export type alter_table_stmt = AstStatement<alter_table_stmt_node>;
233232
234233export type alter_action_list = alter_action [ ] ;
235234
236- export type alter_action = ALTER_ADD_COLUMN | ALTER_DROP_COLUMN | ALTER_ADD_INDEX_OR_KEY | ALTER_ADD_FULLETXT_SPARITAL_INDEX | ALTER_RENAME_TABLE | ALTER_ALGORITHM | ALTER_LOCK ;
235+ export type alter_action = ALTER_ADD_COLUMN | ALTER_ADD_CONSTRAINT | ALTER_DROP_COLUMN | ALTER_ADD_INDEX_OR_KEY | ALTER_ADD_FULLETXT_SPARITAL_INDEX | ALTER_RENAME_TABLE | ALTER_ALGORITHM | ALTER_LOCK ;
237236
238237
239238
@@ -256,6 +255,15 @@ export type ALTER_DROP_COLUMN = {
256255
257256
258257
258+ export type ALTER_ADD_CONSTRAINT = {
259+ action : 'add' ;
260+ create_definitions : create_db_definition ;
261+ resource : 'constraint' ;
262+ type : 'alter' ;
263+ } ;
264+
265+
266+
259267export type ALTER_ADD_INDEX_OR_KEY = {
260268 action : 'add' ;
261269 type : 'alter' ;
@@ -352,14 +360,17 @@ export type create_constraint_foreign = {
352360
353361
354362
363+
364+
355365export type reference_definition = {
356366 definition : cte_column_definition ;
357367 table : table_ref_list ;
358368 keyword : 'references' ;
359369 match : 'match full' | 'match partial' | 'match simple' ;
360- on_delete ?: on_reference ;
361- on_update ?: on_reference ;
362- } ;
370+ on_action : [ on_reference ?] ;
371+ } | {
372+ on_action : [ on_reference ] ;
373+ } ;
363374
364375export type on_reference = { type : 'on delete' | 'on update' ; value : reference_option ; } ;
365376
@@ -632,9 +643,11 @@ export type number_or_param = literal_numeric | var_decl | param;
632643export type limit_clause = { separator : 'offset' | '' ; value : [ number_or_param | { type : 'origin' , value : 'all' } , number_or_param ?] } ;
633644
634645export interface update_stmt_node {
646+ with ?: with_clause ;
635647 type : 'update' ;
636648 table : table_ref_list ;
637649 set : set_list ;
650+ from ?: from_clause ;
638651 where ?: where_clause ;
639652 returning ?: returning_stmt ;
640653 }
@@ -799,7 +812,7 @@ export type additive_operator = "+" | "-";
799812
800813export type multiplicative_expr = binary_expr ;
801814
802- export type multiplicative_operator = "*" | "/" | "%" ;
815+ export type multiplicative_operator = "*" | "/" | "%" | "||" ;
803816
804817export type primary = cast_expr | literal | aggr_func | window_func | func_call | case_expr | interval_expr | column_ref | param | or_and_where_expr | var_decl | { type : 'origin' ; value : string ; } ;
805818
0 commit comments