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 8b2f6a49
authored
Sep 16, 2011
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
1 parent
d75829c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
lib/sequelize/connector-manager.js
lib/sequelize/sequelize.js
lib/sequelize/connector-manager.js
View file @
8b2f6a4
...
@@ -37,7 +37,7 @@ ConnectorManager.prototype.afterQuery = function() {
...
@@ -37,7 +37,7 @@ ConnectorManager.prototype.afterQuery = function() {
}
}
ConnectorManager
.
prototype
.
__defineGetter__
(
'tooManyRequests'
,
function
()
{
ConnectorManager
.
prototype
.
__defineGetter__
(
'tooManyRequests'
,
function
()
{
return
(
this
.
clientRequests
>
3
0
)
return
(
this
.
clientRequests
>
5
0
)
})
})
ConnectorManager
.
prototype
.
__defineGetter__
(
'hasNoConnections'
,
function
()
{
ConnectorManager
.
prototype
.
__defineGetter__
(
'hasNoConnections'
,
function
()
{
...
...
lib/sequelize/sequelize.js
View file @
8b2f6a4
...
@@ -6,9 +6,6 @@ var Utils = require("./utils")
...
@@ -6,9 +6,6 @@ var Utils = require("./utils")
var
Sequelize
=
module
.
exports
=
function
(
database
,
username
,
password
,
options
)
{
var
Sequelize
=
module
.
exports
=
function
(
database
,
username
,
password
,
options
)
{
options
=
options
||
{}
options
=
options
||
{}
var
ModelManager
=
require
(
"./model-manager"
)
this
.
modelManager
=
new
ModelManager
(
this
)
Utils
.
_
.
reject
(
options
,
function
(
_
,
key
)
{
return
[
"host"
,
"port"
,
"disableTableNameModification"
].
indexOf
(
key
)
>
-
1
})
Utils
.
_
.
reject
(
options
,
function
(
_
,
key
)
{
return
[
"host"
,
"port"
,
"disableTableNameModification"
].
indexOf
(
key
)
>
-
1
})
this
.
options
=
options
this
.
options
=
options
...
@@ -19,6 +16,8 @@ var Sequelize = module.exports = function(database, username, password, options)
...
@@ -19,6 +16,8 @@ var Sequelize = module.exports = function(database, username, password, options)
host
:
options
.
host
||
'localhost'
,
host
:
options
.
host
||
'localhost'
,
port
:
options
.
port
||
3306
port
:
options
.
port
||
3306
}
}
this
.
modelManager
=
new
(
require
(
"./model-manager"
))(
this
)
this
.
connectorManager
=
new
(
require
(
'./connector-manager'
))(
this
.
config
)
this
.
connectorManager
=
new
(
require
(
'./connector-manager'
))(
this
.
config
)
}
}
Sequelize
.
Utils
=
Utils
Sequelize
.
Utils
=
Utils
...
...
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