Skip to content

Commit 97235a8

Browse files
committed
refactor: upgrade version
1 parent ad77dc6 commit 97235a8

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ast/postgresql.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,20 @@ export type create_sequence_definition = sequence_definition_increment | sequenc
202202

203203
export type create_sequence_definition_list = create_sequence_definition[];
204204

205+
export type include_column = { type: 'include', keyword: 'include', columns: column_list };
206+
205207
export interface create_index_stmt_node {
206208
type: 'create';
207209
index_type?: 'unique';
210+
if_not_exists: if_not_exists_stmt;
208211
keyword: 'index';
209212
concurrently?: 'concurrently';
210213
index: string;
211214
on_kw: string;
212215
table: table_name;
213216
index_using?: index_type;
214217
index_columns: column_order[];
218+
include?: column_list_items;
215219
with?: index_option[];
216220
with_before_where: true;
217221
tablespace?: {type: 'origin'; value: string; }
@@ -413,7 +417,7 @@ export type ALTER_ADD_COLUMN = {
413417
action: 'add';
414418
keyword: KW_COLUMN;
415419
resource: 'column';
416-
if_not_exists: ife;
420+
if_not_exists: if_not_exists_stmt;
417421
type: 'alter';
418422
} & create_column_definition;;
419423

@@ -856,7 +860,9 @@ export interface select_stmt_node extends select_stmt_nake {
856860
parentheses: true;
857861
}
858862

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;
860866

861867
export type with_clause = cte_definition[] | [cte_definition & { recursive: true; }];
862868

@@ -900,7 +906,7 @@ export type expr_item = binary_column_expr & { array_index: array_index };
900906

901907
export type cast_data_type = data_type & { quoted?: string };
902908

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];
904910

905911
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; };
906912

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-sql-parser",
3-
"version": "5.3.4",
3+
"version": "5.3.5",
44
"description": "simple node sql parser",
55
"main": "index.js",
66
"types": "types.d.ts",

0 commit comments

Comments
 (0)