Skip to content

Commit b2f4281

Browse files
committed
fix: create database with quoted db name in all dialect
1 parent a8ea6b9 commit b2f4281

16 files changed

+24
-24
lines changed

pegjs/athena.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ create_db_stmt
287287
= a:KW_CREATE __
288288
k:(KW_DATABASE / KW_SCHEME) __
289289
ife:if_not_exists_stmt? __
290-
t:ident_name __
290+
t:ident_without_kw_type __
291291
c:create_db_definition? {
292292
return {
293293
tableList: Array.from(tableList),

pegjs/bigquery.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ create_db_stmt
904904
= a:KW_CREATE __
905905
k:(KW_DATABASE / KW_SCHEMA) __
906906
ife:if_not_exists_stmt? __
907-
t:ident_name __
907+
t:ident_without_kw_type __
908908
c:create_db_definition? {
909909
return {
910910
tableList: Array.from(tableList),

pegjs/db2.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ create_db_stmt
286286
= a:KW_CREATE __
287287
k:(KW_DATABASE / KW_SCHEME) __
288288
ife:if_not_exists_stmt? __
289-
t:ident_name __
289+
t:ident_without_kw_type __
290290
c:create_db_definition? {
291291
return {
292292
tableList: Array.from(tableList),

pegjs/flinksql.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ create_db_stmt
628628
= a:KW_CREATE __
629629
k:(KW_DATABASE / KW_SCHEME) __
630630
ife:if_not_exists_stmt? __
631-
t:ident_name __
631+
t:ident_without_kw_type __
632632
c:create_db_definition? {
633633
return {
634634
tableList: Array.from(tableList),

pegjs/hive.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ create_db_stmt
287287
= a:KW_CREATE __
288288
k:(KW_DATABASE / KW_SCHEME) __
289289
ife:if_not_exists_stmt? __
290-
t:ident_name __
290+
t:ident_without_kw_type __
291291
c:create_db_definition? {
292292
return {
293293
tableList: Array.from(tableList),

pegjs/mariadb.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ create_db_stmt
344344
= a:KW_CREATE __
345345
k:(KW_DATABASE / KW_SCHEMA) __
346346
ife:if_not_exists_stmt? __
347-
t:ident_name __
347+
t:ident_without_kw_type __
348348
c:create_db_definition? {
349349
return {
350350
tableList: Array.from(tableList),

pegjs/mysql.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ create_db_stmt
540540
= a:KW_CREATE __
541541
k:(KW_DATABASE / KW_SCHEMA) __
542542
ife:if_not_exists_stmt? __
543-
t:ident_name __
543+
t:ident_without_kw_type __
544544
c:create_db_definition? {
545545
return {
546546
tableList: Array.from(tableList),

pegjs/noql.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,14 @@ create_db_stmt
359359
= a:KW_CREATE __
360360
k:(KW_DATABASE / KW_SCHEMA) __
361361
ife:if_not_exists_stmt? __
362-
t:ident_name __
362+
t:ident_without_kw_type __
363363
c:create_db_definition? {
364364
/*
365365
export type create_db_stmt = {
366366
type: 'create',
367367
keyword: 'database' | 'schema',
368368
if_not_exists?: 'if not exists',
369-
database: string,
369+
database: ident_without_kw_type,
370370
create_definitions?: create_db_definition
371371
}
372372
=> AstStatement<create_db_stmt>

pegjs/postgresql.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,14 @@ create_db_stmt
372372
= a:KW_CREATE __
373373
k:(KW_DATABASE / KW_SCHEMA) __
374374
ife:if_not_exists_stmt? __
375-
t:ident_name __
375+
t:ident_without_kw_type __
376376
c:create_db_definition? {
377377
/*
378378
export type create_db_stmt_t = {
379379
type: 'create',
380380
keyword: 'database' | 'schema',
381381
if_not_exists?: 'if not exists',
382-
database: string,
382+
database: ident_without_kw_type,
383383
create_definitions?: create_db_definition
384384
}
385385
=> AstStatement<create_db_stmt_t>

pegjs/redshift.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,14 @@ create_db_stmt
369369
= a:KW_CREATE __
370370
k:(KW_DATABASE / KW_SCHEMA) __
371371
ife:if_not_exists_stmt? __
372-
t:ident_name __
372+
t:ident_without_kw_type __
373373
c:create_db_definition? {
374374
/*
375375
export type create_db_stmt = {
376376
type: 'create',
377377
keyword: 'database' | 'schema',
378378
if_not_exists?: 'if not exists',
379-
database: string,
379+
database: ident_without_kw_type,
380380
create_definitions?: create_db_definition
381381
}
382382
=> AstStatement<create_db_stmt>

0 commit comments

Comments
 (0)