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 6a9c8509
authored
Aug 18, 2013
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix small spelling mistake in pull 829
1 parent
d0fd6e2f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
lib/sql-string.js
test/sequelize.test.js
lib/sql-string.js
View file @
6a9c850
...
...
@@ -112,7 +112,7 @@ SqlString.formatNamedParameters = function(sql, values, timeZone, dialect) {
return
SqlString
.
escape
(
values
[
key
],
false
,
timeZone
,
dialect
);
}
else
{
throw
new
Error
(
'Named parameter "'
+
value
+
'" as no value in the given object.'
);
throw
new
Error
(
'Named parameter "'
+
value
+
'"
h
as no value in the given object.'
);
}
});
};
...
...
test/sequelize.test.js
View file @
6a9c850
...
...
@@ -202,7 +202,7 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
var
self
=
this
expect
(
function
()
{
self
.
sequelize
.
query
(
'select :one as foo, :two as bar, :three as baz'
,
null
,
{
raw
:
true
},
{
one
:
1
,
two
:
2
})
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+" as no value in the given object
\.
/g
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+"
h
as no value in the given object
\.
/g
)
done
()
})
...
...
@@ -210,7 +210,7 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
var
self
=
this
expect
(
function
()
{
self
.
sequelize
.
query
(
'select :one as foo, :two as bar'
,
null
,
{
raw
:
true
},
2
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+" as no value in the given object
\.
/g
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+"
h
as no value in the given object
\.
/g
)
done
()
})
...
...
@@ -218,7 +218,7 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
var
self
=
this
expect
(
function
()
{
self
.
sequelize
.
query
(
'select :one as foo, :two as bar'
,
null
,
{
raw
:
true
},
{})
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+" as no value in the given object
\.
/g
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+"
h
as no value in the given object
\.
/g
)
done
()
})
...
...
@@ -226,7 +226,7 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
var
self
=
this
expect
(
function
()
{
self
.
sequelize
.
query
(
'select :one as foo, :two as bar'
,
null
,
{
raw
:
true
},
'foobar'
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+" as no value in the given object
\.
/g
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+"
h
as no value in the given object
\.
/g
)
done
()
})
...
...
@@ -234,7 +234,7 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
var
self
=
this
expect
(
function
()
{
self
.
sequelize
.
query
(
'select :one as foo, :two as bar'
,
null
,
{
raw
:
true
},
new
Date
())
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+" as no value in the given object
\.
/g
)
}).
to
.
throw
(
Error
,
/Named parameter ":
\w
+"
h
as no value in the given object
\.
/g
)
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