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 505c24cd
authored
Dec 31, 2011
by
sdepold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor refactoring
1 parent
091a4a24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
lib/sequelize.js
lib/sequelize.js
View file @
505c24c
...
@@ -26,7 +26,7 @@ module.exports = (function() {
...
@@ -26,7 +26,7 @@ module.exports = (function() {
var
ConnectorManager
=
require
(
"./dialects/"
+
this
.
options
.
dialect
+
"/connector-manager"
)
var
ConnectorManager
=
require
(
"./dialects/"
+
this
.
options
.
dialect
+
"/connector-manager"
)
this
.
modelManager
=
new
ModelManager
(
this
)
this
.
modelManager
=
new
ModelManager
(
this
)
this
.
connectorManager
=
new
ConnectorManager
(
this
,
this
.
config
)
this
.
connectorManager
=
new
ConnectorManager
(
this
,
this
.
config
)
}
}
...
@@ -38,6 +38,15 @@ module.exports = (function() {
...
@@ -38,6 +38,15 @@ module.exports = (function() {
return
this
.
queryInterface
return
this
.
queryInterface
}
}
Sequelize
.
prototype
.
getMigrator
=
function
(
options
,
force
)
{
if
(
force
)
this
.
migrator
=
new
Migrator
(
this
,
options
)
else
this
.
migrator
=
this
.
migrator
||
new
Migrator
(
this
,
options
)
return
this
.
migrator
}
Sequelize
.
prototype
.
define
=
function
(
modelName
,
attributes
,
options
)
{
Sequelize
.
prototype
.
define
=
function
(
modelName
,
attributes
,
options
)
{
options
=
options
||
{}
options
=
options
||
{}
...
@@ -57,7 +66,7 @@ module.exports = (function() {
...
@@ -57,7 +66,7 @@ module.exports = (function() {
}
}
Sequelize
.
prototype
.
migrate
=
function
(
options
)
{
Sequelize
.
prototype
.
migrate
=
function
(
options
)
{
new
Migrator
(
this
,
options
).
migrate
(
)
this
.
getMigrator
().
migrate
(
options
)
}
}
Sequelize
.
prototype
.
query
=
function
(
sql
,
callee
,
options
)
{
Sequelize
.
prototype
.
query
=
function
(
sql
,
callee
,
options
)
{
...
...
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