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 6b7c80fe
authored
Jun 28, 2013
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mysql query gen test
1 parent
ce8a63e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
lib/dialects/postgres/query-generator.js
spec-jasmine/mysql/query-generator.spec.js
lib/dialects/postgres/query-generator.js
View file @
6b7c80f
...
@@ -293,7 +293,6 @@ module.exports = (function() {
...
@@ -293,7 +293,6 @@ module.exports = (function() {
attrValueHash
=
Utils
.
removeNullValuesFromHash
(
attrValueHash
,
this
.
options
.
omitNull
)
attrValueHash
=
Utils
.
removeNullValuesFromHash
(
attrValueHash
,
this
.
options
.
omitNull
)
var
query
=
"INSERT INTO <%= table %> (<%= attributes %>) VALUES (<%= values %>) RETURNING *;"
var
query
=
"INSERT INTO <%= table %> (<%= attributes %>) VALUES (<%= values %>) RETURNING *;"
// Remove serials that are null or undefined, which causes an error in PG
// Remove serials that are null or undefined, which causes an error in PG
Utils
.
_
.
forEach
(
attrValueHash
,
function
(
value
,
key
,
hash
)
{
Utils
.
_
.
forEach
(
attrValueHash
,
function
(
value
,
key
,
hash
)
{
if
(
tables
[
tableName
])
{
if
(
tables
[
tableName
])
{
...
...
spec-jasmine/mysql/query-generator.spec.js
View file @
6b7c80f
...
@@ -178,9 +178,9 @@ describe('QueryGenerator', function() {
...
@@ -178,9 +178,9 @@ describe('QueryGenerator', function() {
expectation
:
"SELECT * FROM `myTable` LIMIT 2, 10;"
,
expectation
:
"SELECT * FROM `myTable` LIMIT 2, 10;"
,
context
:
QueryGenerator
context
:
QueryGenerator
},
{
},
{
title
:
'
ignores offset if no limit was pass
ed'
,
title
:
'
uses default limit if only offset is specifi
ed'
,
arguments
:
[
'myTable'
,
{
offset
:
2
}],
arguments
:
[
'myTable'
,
{
offset
:
2
}],
expectation
:
"SELECT * FROM `myTable`;"
,
expectation
:
"SELECT * FROM `myTable`
LIMIT 2, 18440000000000000000
;"
,
context
:
QueryGenerator
context
:
QueryGenerator
},
{
},
{
title
:
'multiple where arguments'
,
title
:
'multiple where arguments'
,
...
...
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