Skip to content

Commit a30738b

Browse files
Merge pull request #2093 from taozhi8833998/refactor-update-type-definition
refactor: upgrade version
2 parents b5b4f2d + 07cab5f commit a30738b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

ast/postgresql.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export type create_db_stmt_t = {
5252
type: 'create',
5353
keyword: 'database' | 'schema',
5454
if_not_exists?: 'if not exists',
55-
database?: { db: string, schema: string };
56-
schema?: { db: string, schema: string };
55+
database?: { db: ident_without_kw_type, schema: [ident_without_kw_type] };
56+
schema?: { db: ident_without_kw_type, schema: [ident_without_kw_type] };
5757
create_definitions?: create_db_definition
5858
}
5959

@@ -1200,7 +1200,7 @@ export type unary_expr_or_primary = jsonb_expr | unary_expr;
12001200

12011201
export type unary_operator = "!" | "-" | "+" | "~";
12021202

1203-
export type jsonb_expr = binary_expr | primary | binary_expr;
1203+
export type jsonb_expr = primary | binary_expr;
12041204

12051205
export type string_constants_escape = { type: 'origin'; value: string; };
12061206

@@ -1354,7 +1354,7 @@ export type cast_expr = {
13541354
keyword: 'cast';
13551355
} & cast_double_colon | ({
13561356
type: 'cast';
1357-
expr: literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param
1357+
expr: literal | jsonb_expr | aggr_func | func_call | case_expr | interval_expr | column_ref | param
13581358
| expr;
13591359
keyword: 'cast';
13601360
} & cast_double_colon);
@@ -1650,6 +1650,8 @@ type KW_TIME = never;
16501650

16511651
type KW_TIMESTAMP = never;
16521652

1653+
type KW_TIMESTAMPTZ = never;
1654+
16531655
type KW_TRUNCATE = never;
16541656

16551657
type KW_USER = never;
@@ -1921,6 +1923,8 @@ export type timezone = string[];;
19211923

19221924

19231925

1926+
1927+
19241928
export type time_type = data_type;
19251929

19261930

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.1",
3+
"version": "5.3.2",
44
"description": "simple node sql parser",
55
"main": "index.js",
66
"types": "types.d.ts",

0 commit comments

Comments
 (0)