Skip to content

Commit 5060891

Browse files
Merge pull request taozhi8833998#2629 from taozhi8833998/upgrade-version
refactor: upgrade version
2 parents 9706a61 + 6954127 commit 5060891

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

ast/postgresql.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export type alter_table_stmt = AstStatement<alter_table_stmt_node>;
448448

449449
export type alter_action_list = alter_action[];
450450

451-
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 | ALTER_ALGORITHM | ALTER_LOCK | ALTER_OWNER_TO | ALTER_COLUMN_DATA_TYPE | ALTER_COLUMN_DEFAULT | ALTER_COLUMN_NOT_NULL;
451+
export type alter_action = ALTER_ADD_COLUMN | ALTER_ADD_CONSTRAINT | ALTER_DROP_CONSTRAINT | ALTER_DROP_COLUMN | ALTER_ADD_INDEX_OR_KEY | ALTER_ADD_FULLETXT_SPARITAL_INDEX | ALTER_RENAME | ALTER_ALGORITHM | ALTER_LOCK | ALTER_OWNER_TO | ALTER_COLUMN_DATA_TYPE | ALTER_COLUMN_DEFAULT | ALTER_COLUMN_NOT_NULL | ALTER_REPLICA_IDENTITY;
452452

453453

454454

@@ -482,6 +482,16 @@ export type ALTER_ADD_CONSTRAINT = {
482482

483483

484484

485+
export type ALTER_DROP_CONSTRAINT = {
486+
action: 'drop';
487+
constraint: ident,
488+
keyword: 'constraint',
489+
resource: 'constraint',
490+
type: 'alter';
491+
};
492+
493+
494+
485495
export type ALTER_ADD_INDEX_OR_KEY = {
486496
action: 'add';
487497
type: 'alter';
@@ -552,6 +562,16 @@ export type ALTER_COLUMN_NOT_NULL = {
552562

553563

554564

565+
export type ALTER_REPLICA_IDENTITY = {
566+
action: 'replica';
567+
keyword?: 'identity';
568+
resource: 'replica_identity';
569+
type: 'alter';
570+
replica_identity: 'default' | 'full' | 'nothing';
571+
};
572+
573+
574+
555575
export type create_index_definition = {
556576
index: column;
557577
definition: cte_column_definition;
@@ -1429,7 +1449,6 @@ export type cast_data_type = data_type & { quoted?: string };
14291449

14301450

14311451
export type cast_double_colon = {
1432-
as?: alias_clause,
14331452
symbol: '::' | 'as',
14341453
target: cast_data_type[];
14351454
};
@@ -1733,6 +1752,10 @@ type KW_LONGTEXT = never;
17331752

17341753
type KW_MEDIUMINT = never;
17351754

1755+
type KW_TSVECTOR = never;
1756+
1757+
type KW_TSQUERY = never;
1758+
17361759
type KW_BIGINT = never;
17371760

17381761
type KW_ENUM = never;
@@ -2068,6 +2091,8 @@ export type serial_interval_type = data_type;
20682091

20692092

20702093

2094+
2095+
20712096
export type text_type = data_type;
20722097

20732098

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-sql-parser",
3-
"version": "5.3.13",
3+
"version": "5.4.0",
44
"description": "simple node sql parser",
55
"main": "index.js",
66
"types": "types.d.ts",

0 commit comments

Comments
 (0)