Skip to content

Commit

Permalink
Merge pull request #2247 from taozhi8833998/upgrade-version
Browse files Browse the repository at this point in the history
refactor: upgrade version
  • Loading branch information
taozhi8833998 authored Dec 2, 2024
2 parents ad77dc6 + 97235a8 commit b1b3cca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions ast/postgresql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,20 @@ export type create_sequence_definition = sequence_definition_increment | sequenc

export type create_sequence_definition_list = create_sequence_definition[];

export type include_column = { type: 'include', keyword: 'include', columns: column_list };

export interface create_index_stmt_node {
type: 'create';
index_type?: 'unique';
if_not_exists: if_not_exists_stmt;
keyword: 'index';
concurrently?: 'concurrently';
index: string;
on_kw: string;
table: table_name;
index_using?: index_type;
index_columns: column_order[];
include?: column_list_items;
with?: index_option[];
with_before_where: true;
tablespace?: {type: 'origin'; value: string; }
Expand Down Expand Up @@ -413,7 +417,7 @@ export type ALTER_ADD_COLUMN = {
action: 'add';
keyword: KW_COLUMN;
resource: 'column';
if_not_exists: ife;
if_not_exists: if_not_exists_stmt;
type: 'alter';
} & create_column_definition;;

Expand Down Expand Up @@ -856,7 +860,9 @@ export interface select_stmt_node extends select_stmt_nake {
parentheses: true;
}

export type select_stmt = { type: 'select'; } | select_stmt_nake | select_stmt_node;
export type select_stmt_parentheses = select_stmt_node;

export type select_stmt = { type: 'select'; } | select_stmt_nake | select_stmt_parentheses;

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

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

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

export type column_item_suffix = [{ type: 'origin'; value: string; }, quoted_ident_type];
export type column_item_suffix = [{ type: 'origin'; value: string; }, quoted_ident_type | column_ref];

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-sql-parser",
"version": "5.3.4",
"version": "5.3.5",
"description": "simple node sql parser",
"main": "index.js",
"types": "types.d.ts",
Expand Down

0 comments on commit b1b3cca

Please sign in to comment.