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 7199ff80
authored
Jun 05, 2013
by
Daniel Durante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default ports are now declared in the ConnectorManager.
1 parent
6a36ca11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
lib/dialects/mysql/connector-manager.js
lib/dialects/postgres/connector-manager.js
lib/sequelize.js
lib/dialects/mysql/connector-manager.js
View file @
7199ff8
...
@@ -12,6 +12,7 @@ module.exports = (function() {
...
@@ -12,6 +12,7 @@ module.exports = (function() {
this
.
sequelize
=
sequelize
this
.
sequelize
=
sequelize
this
.
client
=
null
this
.
client
=
null
this
.
config
=
config
||
{}
this
.
config
=
config
||
{}
this
.
config
.
port
=
this
.
config
.
port
||
3306
this
.
disconnectTimeoutId
=
null
this
.
disconnectTimeoutId
=
null
this
.
queue
=
[]
this
.
queue
=
[]
this
.
activeQueue
=
[]
this
.
activeQueue
=
[]
...
...
lib/dialects/postgres/connector-manager.js
View file @
7199ff8
...
@@ -4,10 +4,11 @@ var Query = require("./query")
...
@@ -4,10 +4,11 @@ var Query = require("./query")
module
.
exports
=
(
function
()
{
module
.
exports
=
(
function
()
{
var
ConnectorManager
=
function
(
sequelize
,
config
)
{
var
ConnectorManager
=
function
(
sequelize
,
config
)
{
this
.
sequelize
=
sequelize
this
.
sequelize
=
sequelize
this
.
client
=
null
this
.
client
=
null
this
.
config
=
config
||
{}
this
.
config
=
config
||
{}
this
.
pooling
=
(
!!
this
.
config
.
poolCfg
&&
(
this
.
config
.
poolCfg
.
maxConnections
>
0
))
this
.
config
.
port
=
this
.
config
.
port
||
5432
this
.
pg
=
this
.
config
.
native
?
require
(
'pg'
).
native
:
require
(
'pg'
)
this
.
pooling
=
(
!!
this
.
config
.
poolCfg
&&
(
this
.
config
.
poolCfg
.
maxConnections
>
0
))
this
.
pg
=
this
.
config
.
native
?
require
(
'pg'
).
native
:
require
(
'pg'
)
// set pooling parameters if specified
// set pooling parameters if specified
if
(
this
.
pooling
)
{
if
(
this
.
pooling
)
{
...
...
lib/sequelize.js
View file @
7199ff8
...
@@ -69,7 +69,6 @@ module.exports = (function() {
...
@@ -69,7 +69,6 @@ module.exports = (function() {
this
.
options
=
Utils
.
_
.
extend
({
this
.
options
=
Utils
.
_
.
extend
({
dialect
:
'mysql'
,
dialect
:
'mysql'
,
host
:
'localhost'
,
host
:
'localhost'
,
port
:
3306
,
protocol
:
'tcp'
,
protocol
:
'tcp'
,
define
:
{},
define
:
{},
query
:
{},
query
:
{},
...
...
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