7
7
8
8
export type start = multiple_stmt | create_function_stmt ;
9
9
10
- export type cmd_stmt = drop_stmt | create_stmt | declare_stmt | truncate_stmt | rename_stmt | call_stmt | use_stmt | alter_stmt | set_stmt | lock_stmt | show_stmt | deallocate_stmt | grant_revoke_stmt | if_else_stmt | raise_stmt | execute_stmt | for_loop_stmt | transaction_stmt ;
10
+ export type cmd_stmt = drop_stmt | create_stmt | declare_stmt | truncate_stmt | rename_stmt | call_stmt | use_stmt | alter_stmt | set_stmt | lock_stmt | show_stmt | deallocate_stmt | grant_revoke_stmt | if_else_stmt | raise_stmt | execute_stmt | for_loop_stmt | transaction_stmt | comment_on_stmt ;
11
11
12
12
export type create_stmt = create_table_stmt | create_constraint_trigger | create_extension_stmt | create_index_stmt | create_sequence | create_db_stmt | create_domain_stmt | create_type_stmt | create_view_stmt | create_aggregate_stmt ;
13
13
@@ -111,12 +111,12 @@ export type declare_stmt_t = { type: 'declare'; declare: declare_variable_item[]
111
111
112
112
export type declare_stmt = AstStatement < declare_stmt_t > ;
113
113
114
- export type create_func_opt = literal_string | { type : 'as' ; begin ?: string ; declare ?: declare_stmt ; expr : multiple_stmt ; end ?: string ; symbol : string ; } | literal_numeric | { type : "set" ; parameter : ident_name ; value ?: { prefix : string ; expr : expr } } ;
114
+ export type create_func_opt = literal_string | { type : 'as' ; begin ?: string ; declare ?: declare_stmt ; expr : multiple_stmt ; end ?: string ; symbol : string ; } | literal_numeric | { type : "set" ; parameter : ident_name ; value ?: { prefix : string ; expr : expr } } | return_stmt ;
115
115
116
116
export type create_function_stmt_t = {
117
117
type : 'create' ;
118
118
replace ?: string ;
119
- name : { schema ?: string ; name : string } ;
119
+ name : proc_func_name ;
120
120
args ?: alter_func_args ;
121
121
returns ?: func_returns ;
122
122
keyword : 'function' ;
@@ -820,15 +820,37 @@ export interface for_loop_stmt_t {
820
820
821
821
export type for_loop_stmt = AstStatement < for_loop_stmt_t > ;
822
822
823
+ export type transaction_mode_isolation_level = { type : 'origin' ; value : string ; } | ignore ;
824
+
825
+ export type transaction_mode = { type : 'origin' ; value : string ; } | ignore ;
826
+
827
+ export type transaction_mode_list = transaction_mode [ ] ;
828
+
823
829
export interface transaction_stmt_t {
824
830
type : 'transaction' ;
825
831
expr : {
826
- type : 'origin' ,
827
- value : string
832
+ action : {
833
+ type : 'origin' ,
834
+ value : string
835
+ } ;
836
+ keyword ?: string ;
837
+ modes ?: transaction_mode [ ] ;
828
838
}
829
839
}
830
840
831
- export type transaction_stmt = AstStatement < transaction_stmt_t > ;
841
+ export type transaction_stmt = AstStatement < transaction_stmt_t > | ignore ;
842
+
843
+ export type comment_on_option = { type : string ; name : table_name ; } | { type : string ; name : column_ref ; } | { type : string ; name : ident ; } ;
844
+
845
+ export type comment_on_is = { keyword : 'is' ; expr : literal_string | literal_null ; } ;
846
+
847
+ export interface comment_on_stmt_t {
848
+ type : 'comment' ;
849
+ target : comment_on_option ;
850
+ expr : comment_on_is ;
851
+ }
852
+
853
+ export type comment_on_stmt = AstStatement < comment_on_stmt_t > ;
832
854
833
855
export interface select_stmt_node extends select_stmt_nake {
834
856
parentheses : true ;
@@ -842,7 +864,7 @@ export type cte_definition = { name: { type: 'default'; value: string; }; stmt:
842
864
843
865
export type cte_column_definition = column_ref_list ;
844
866
845
- export type distinct_on = { type : string ; columns : column_ref_list ; } | { type : string | undefined ; } ;
867
+ export type distinct_on = { type : string ; columns : column_list_items ; } | { type : string | undefined ; } ;
846
868
847
869
848
870
@@ -866,7 +888,9 @@ export type option_clause = query_option[];
866
888
867
889
export type query_option = 'SQL_CALC_FOUND_ROWS' | 'SQL_CACHE' | 'SQL_NO_CACHE' | 'SQL_BIG_RESULT' | 'SQL_SMALL_RESULT' | 'SQL_BUFFER_RESULT' ;
868
890
869
- export type column_clause = 'ALL' | '*' | column_list_item [ ] | column_list_item [ ] ;
891
+ export type column_list_items = column_list_item [ ] ;
892
+
893
+ export type column_clause = 'ALL' | '*' | column_list_item [ ] | column_list_items ;
870
894
871
895
export type array_index = { brackets : boolean , number : number } ;
872
896
@@ -1448,6 +1472,8 @@ type KW_RECURSIVE = never;
1448
1472
1449
1473
type KW_REPLACE = never ;
1450
1474
1475
+ type KW_RETURN = never ;
1476
+
1451
1477
type KW_RETURNING = never ;
1452
1478
1453
1479
type KW_RENAME = never ;
@@ -1480,6 +1506,8 @@ type KW_TABLESPACE = never;
1480
1506
1481
1507
type KW_COLLATE = never ;
1482
1508
1509
+ type KW_COLLATION = never ;
1510
+
1483
1511
type KW_DEALLOCATE = never ;
1484
1512
1485
1513
type KW_ON = never ;
@@ -1628,6 +1656,8 @@ type KW_MEDIUMTEXT = never;
1628
1656
1629
1657
type KW_LONGTEXT = never ;
1630
1658
1659
+ type KW_MEDIUMINT = never ;
1660
+
1631
1661
type KW_BIGINT = never ;
1632
1662
1633
1663
type KW_ENUM = never ;
@@ -1734,8 +1764,6 @@ type KW_VAR_PRE_DOLLAR_DOUBLE = never;
1734
1764
1735
1765
type KW_VAR_PRE = never ;
1736
1766
1737
- type KW_RETURN = never ;
1738
-
1739
1767
type KW_ASSIGN = never ;
1740
1768
1741
1769
type KW_DOUBLE_COLON = never ;
@@ -1899,8 +1927,6 @@ export type binary_type = data_type;
1899
1927
1900
1928
export type character_varying = string ;
1901
1929
1902
-
1903
-
1904
1930
export type character_string_type = data_type ;
1905
1931
1906
1932
export type numeric_type_suffix = any [ ] ; ;
@@ -1921,16 +1947,10 @@ export type timezone = string[];;
1921
1947
1922
1948
1923
1949
1924
-
1925
-
1926
-
1927
-
1928
1950
export type time_type = data_type ;
1929
1951
1930
1952
1931
1953
1932
-
1933
-
1934
1954
export type datetime_type = data_type | time_type ;
1935
1955
1936
1956
@@ -1951,8 +1971,6 @@ export type serial_interval_type = data_type;
1951
1971
1952
1972
1953
1973
1954
-
1955
-
1956
1974
export type text_type = data_type ;
1957
1975
1958
1976
0 commit comments