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 593c382e
authored
Nov 25, 2012
by
Sascha Depold
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://github.com/lmjohns3/sequelize
into lmjohns3-master
2 parents
7d681b31
2e52cfdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
lib/dialects/sqlite/query-generator.js
spec/sqlite/dao.spec.js
lib/dialects/sqlite/query-generator.js
View file @
593c382
...
...
@@ -182,7 +182,7 @@ module.exports = (function() {
}
}
return
hashToWhereConditions
(
hash
)
return
hashToWhereConditions
(
hash
)
.
replace
(
/
\\
'/g
,
"''"
);
}
}
...
...
spec/sqlite/dao.spec.js
View file @
593c382
...
...
@@ -48,6 +48,20 @@ if (dialect === 'sqlite') {
console
.
log
(
err
)
})
})
it
(
"escapes strings properly in where clauses"
,
function
(
done
)
{
var
self
=
this
this
.
User
.
create
({
username
:
"user'name"
})
.
success
(
function
(
user
)
{
self
.
User
.
findAll
({
where
:
{
username
:
"user'name"
}
}).
success
(
function
(
users
)
{
expect
(
users
.
length
).
toEqual
(
1
)
done
()
})
})
})
})
})
}
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