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 f7304d7f
authored
Jan 07, 2014
by
maximeCony
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build where with quoteIdentifier and escape
1 parent
b1d48a48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
test/dao-factory.test.js
test/dao-factory.test.js
View file @
f7304d7
...
...
@@ -1710,12 +1710,14 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
it
(
'should not fail with an include'
,
function
(
done
)
{
var
tableName
=
''
,
ident
=
this
.
sequelize
.
queryInterface
.
QueryGenerator
.
quoteIdentifier
,
escape
=
this
.
sequelize
.
queryInterface
.
QueryGenerator
.
escape
if
(
this
.
Project
.
tableName
)
{
tableName
=
'"'
+
this
.
Project
.
tableName
+
'"
.'
tableName
=
ident
(
this
.
Project
.
tableName
)
+
'
.'
}
this
.
User
.
findAll
({
where
:
[
tableName
+
'"title" = \'republic\' '
tableName
+
ident
(
'title'
)
+
' = '
+
escape
(
'republic'
)
],
include
:
[
{
model
:
this
.
Project
}
...
...
@@ -1734,12 +1736,13 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
it
(
'should not overwrite a specified deletedAt'
,
function
(
done
)
{
var
tableName
=
''
,
ident
=
this
.
sequelize
.
queryInterface
.
QueryGenerator
.
quoteIdentifier
if
(
this
.
User
.
tableName
)
{
tableName
=
'"'
+
this
.
User
.
tableName
+
'"
.'
tableName
=
ident
(
this
.
User
.
tableName
)
+
'
.'
}
this
.
User
.
findAll
({
where
:
[
tableName
+
'"deletedAt"
IS NOT NULL '
tableName
+
ident
(
'deletedAt'
)
+
'
IS NOT NULL '
],
include
:
[
{
model
:
this
.
Project
}
...
...
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