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 14ca4e6e
authored
Feb 26, 2013
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql is working :)
1 parent
4281e799
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
15 deletions
lib/dao-factory.js
lib/query-interface.js
spec/dao-factory.spec.js
lib/dao-factory.js
View file @
14ca4e6
...
@@ -143,23 +143,16 @@ module.exports = (function() {
...
@@ -143,23 +143,16 @@ module.exports = (function() {
var
hasJoin
=
false
var
hasJoin
=
false
var
options
=
Utils
.
_
.
clone
(
options
)
var
options
=
Utils
.
_
.
clone
(
options
)
if
(
(
typeof
options
===
'object'
)
&&
(
options
.
hasOwnProperty
(
'include'
))
)
{
if
(
typeof
options
===
'object'
)
{
var
includes
=
options
.
includ
e
hasJoin
=
tru
e
hasJoin
=
true
if
(
options
.
hasOwnProperty
(
'include'
))
{
options
.
include
=
{}
hasJoin
=
true
/*options.include =*/
includes
.
map
(
function
(
include
)
{
console
.
log
(
include
instanceof
DAOFactory
)
})
includes
.
forEach
(
function
(
daoName
)
{
options
.
include
[
daoName
]
=
this
.
daoFactoryManager
.
getDAO
(
daoName
)
if
(
!
options
.
include
[
daoName
]
)
{
options
.
include
=
options
.
include
.
map
(
function
(
include
)
{
options
.
include
[
daoName
]
=
this
.
getAssociationByAlias
(
daoName
).
target
return
validateIncludedElement
.
call
(
this
,
include
)
}
}
.
bind
(
this
))
}
.
bind
(
this
))
}
// whereCollection is used for non-primary key updates
// whereCollection is used for non-primary key updates
this
.
options
.
whereCollection
=
options
.
where
||
null
this
.
options
.
whereCollection
=
options
.
where
||
null
...
...
lib/query-interface.js
View file @
14ca4e6
...
@@ -198,6 +198,8 @@ module.exports = (function() {
...
@@ -198,6 +198,8 @@ module.exports = (function() {
}
}
QueryInterface
.
prototype
.
select
=
function
(
factory
,
tableName
,
options
,
queryOptions
)
{
QueryInterface
.
prototype
.
select
=
function
(
factory
,
tableName
,
options
,
queryOptions
)
{
options
=
options
||
{}
var
sql
=
this
.
QueryGenerator
.
selectQuery
(
tableName
,
options
)
var
sql
=
this
.
QueryGenerator
.
selectQuery
(
tableName
,
options
)
queryOptions
=
Utils
.
_
.
extend
({},
queryOptions
,
{
include
:
options
.
include
})
queryOptions
=
Utils
.
_
.
extend
({},
queryOptions
,
{
include
:
options
.
include
})
return
queryAndEmit
.
call
(
this
,
[
sql
,
factory
,
queryOptions
],
'select'
)
return
queryAndEmit
.
call
(
this
,
[
sql
,
factory
,
queryOptions
],
'select'
)
...
...
spec/dao-factory.spec.js
View file @
14ca4e6
This diff is collapsed.
Click to expand it.
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