Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit d028c823
authored
Aug 14, 2017
by
Harish K
Committed by
Sushant
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: quote tableName alias as an identifier as it can contain schema (#8038)
1 parent
9521a353
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
lib/dialects/abstract/query-generator.js
lib/dialects/abstract/query-generator.js
View file @
d028c82
...
@@ -958,9 +958,9 @@ const QueryGenerator = {
...
@@ -958,9 +958,9 @@ const QueryGenerator = {
// resolve table name options
// resolve table name options
if
(
options
.
tableAs
)
{
if
(
options
.
tableAs
)
{
mainTable
.
as
=
this
.
quote
Table
(
options
.
tableAs
);
mainTable
.
as
=
this
.
quote
Identifier
(
options
.
tableAs
);
}
else
if
(
!
Array
.
isArray
(
mainTable
.
name
)
&&
mainTable
.
model
)
{
}
else
if
(
!
Array
.
isArray
(
mainTable
.
name
)
&&
mainTable
.
model
)
{
mainTable
.
as
=
this
.
quote
Table
(
mainTable
.
model
.
name
);
mainTable
.
as
=
this
.
quote
Identifier
(
mainTable
.
model
.
name
);
}
}
mainTable
.
quotedName
=
!
Array
.
isArray
(
mainTable
.
name
)
?
this
.
quoteTable
(
mainTable
.
name
)
:
tableName
.
map
(
t
=>
{
mainTable
.
quotedName
=
!
Array
.
isArray
(
mainTable
.
name
)
?
this
.
quoteTable
(
mainTable
.
name
)
:
tableName
.
map
(
t
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment