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 3d338922
authored
Apr 04, 2015
by
Shoshomiga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix where with sequelize.fn
1 parent
f5fc5010
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
lib/dialects/abstract/query-generator.js
test/unit/sql/where.test.js
lib/dialects/abstract/query-generator.js
View file @
3d33892
...
...
@@ -1656,7 +1656,7 @@ module.exports = (function() {
}
}
if
(
value
&&
value
.
_isSequelizeMethod
)
{
if
(
value
&&
value
.
_isSequelizeMethod
&&
!
(
key
!==
undefined
&&
value
instanceof
Utils
.
fn
)
)
{
return
this
.
handleSequelizeMethod
(
value
);
}
...
...
test/unit/sql/where.test.js
View file @
3d33892
...
...
@@ -463,5 +463,13 @@ suite(Support.getTestDialectTeaser('SQL'), function() {
});
});
}
suite
(
'fn'
,
function
()
{
test
(
'{name: this.sequelize.fn(\'LOWER\', \'DERP\')}'
,
function
()
{
expectsql
(
sql
.
whereQuery
({
name
:
this
.
sequelize
.
fn
(
'LOWER'
,
'DERP'
)}),
{
default
:
"WHERE [name] = LOWER('DERP')"
});
});
});
});
});
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