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 8a81de1e
authored
Oct 29, 2013
by
Daniel Durante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests.
1 parent
c55da04d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
lib/dialects/postgres/query-generator.js
lib/dialects/sqlite/query-generator.js
test/dao-factory.test.js
lib/dialects/postgres/query-generator.js
View file @
8a81de1
...
...
@@ -138,7 +138,7 @@ module.exports = (function() {
return
false
}
return
[
1
].
split
(
'_'
).
splice
(
1
)
return
match
[
1
].
split
(
'_'
).
splice
(
1
)
}
},
...
...
lib/dialects/sqlite/query-generator.js
View file @
8a81de1
...
...
@@ -200,7 +200,6 @@ module.exports = (function() {
return
Utils
.
_
.
template
(
query
)(
replacements
)
},
<<<<<<<
HEAD
selectQuery
:
function
(
tableName
,
options
,
factory
)
{
var
table
=
null
,
joinQuery
=
""
...
...
test/dao-factory.test.js
View file @
8a81de1
...
...
@@ -164,7 +164,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
var
UserTable
=
this
.
sequelize
.
define
(
'UserCol'
,
{
aNumber
:
{
type
:
Sequelize
.
INTEGER
,
defaultValue
:
defaultFunction
defaultValue
:
defaultFunction
}
},
{
timestamps
:
true
})
...
...
@@ -620,6 +620,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
})
})
it
(
"casts empty array correct for postgres update"
,
function
(
done
)
{
if
(
dialect
!==
"postgres"
)
{
expect
(
''
).
to
.
equal
(
''
)
...
...
@@ -653,8 +654,8 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
User
.
sync
({
force
:
true
}).
on
(
'sql'
,
function
(
sql
)
{
expect
(
sql
).
to
.
match
(
/UNIQUE
\(
username, email
\)
/
)
expect
(
sql
).
to
.
match
(
/UNIQUE
\(
aCol, bCol
\)
/
)
expect
(
sql
).
to
.
match
(
/UNIQUE
\s
*
(
uniq_UserWithUniqueUsernames_username_email
)?\s
*
\([
`"
]?
username
[
`"
]?
,
[
`"
]?
email
[
`"
]?
\)
/
)
expect
(
sql
).
to
.
match
(
/UNIQUE
\s
*
(
uniq_UserWithUniqueUsernames_aCol_bCol
)?\s
*
\([
`"
]?
aCol
[
`"
]?
,
[
`"
]?
bCol
[
`"
]?
\)
/
)
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