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 5da0c239
authored
Sep 15, 2013
by
wenyuxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove side effect in Util.format to fix bug `some function will modify passed arguments`.
1 parent
253b149a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
lib/dialects/postgres/query-generator.js
lib/utils.js
lib/dialects/postgres/query-generator.js
View file @
5da0c23
...
...
@@ -547,7 +547,7 @@ module.exports = (function() {
result
=
smth
}
else
if
(
Array
.
isArray
(
smth
))
{
result
=
Utils
.
format
(
smth
.
slice
(
0
)
,
"postgres"
)
result
=
Utils
.
format
(
smth
,
"postgres"
)
}
return
result
...
...
lib/utils.js
View file @
5da0c23
...
...
@@ -55,7 +55,7 @@ var Utils = module.exports = {
},
format
:
function
(
arr
,
dialect
)
{
var
timeZone
=
null
;
return
SqlString
.
format
(
arr
.
shift
(),
arr
,
timeZone
,
dialect
)
return
SqlString
.
format
(
arr
[
0
],
arr
.
slice
(
1
)
,
timeZone
,
dialect
)
},
formatNamedParameters
:
function
(
sql
,
parameters
,
dialect
)
{
var
timeZone
=
null
;
...
...
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