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 8edfcff5
authored
Nov 16, 2012
by
denysonique
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow users to specify config.native in order to use the native pg client
1 parent
3f3a797b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
lib/dialects/postgres/connector-manager.js
lib/sequelize.js
lib/dialects/postgres/connector-manager.js
View file @
8edfcff
...
@@ -9,6 +9,9 @@ module.exports = (function() {
...
@@ -9,6 +9,9 @@ module.exports = (function() {
this
.
client
=
null
this
.
client
=
null
this
.
config
=
config
||
{}
this
.
config
=
config
||
{}
this
.
pooling
=
(
this
.
config
.
poolCfg
!=
null
&&
this
.
config
.
poolCfg
.
maxConnections
>
0
)
this
.
pooling
=
(
this
.
config
.
poolCfg
!=
null
&&
this
.
config
.
poolCfg
.
maxConnections
>
0
)
if
(
this
.
config
.
native
)
{
pg
=
pg
.
native
}
// set pooling parameters if specified
// set pooling parameters if specified
if
(
this
.
pooling
)
{
if
(
this
.
pooling
)
{
pg
.
defaults
.
poolSize
=
this
.
config
.
poolCfg
.
maxConnections
pg
.
defaults
.
poolSize
=
this
.
config
.
poolCfg
.
maxConnections
...
...
lib/sequelize.js
View file @
8edfcff
...
@@ -37,7 +37,8 @@ module.exports = (function() {
...
@@ -37,7 +37,8 @@ module.exports = (function() {
sync
:
{},
sync
:
{},
logging
:
console
.
log
,
logging
:
console
.
log
,
omitNull
:
false
,
omitNull
:
false
,
queue
:
true
queue
:
true
,
native
:
false
},
options
||
{})
},
options
||
{})
if
(
this
.
options
.
logging
===
true
)
{
if
(
this
.
options
.
logging
===
true
)
{
...
@@ -54,6 +55,7 @@ module.exports = (function() {
...
@@ -54,6 +55,7 @@ module.exports = (function() {
pool
:
this
.
options
.
pool
,
pool
:
this
.
options
.
pool
,
protocol
:
this
.
options
.
protocol
,
protocol
:
this
.
options
.
protocol
,
queue
:
this
.
options
.
queue
,
queue
:
this
.
options
.
queue
,
native
:
this
.
options
.
native
,
maxConcurrentQueries
:
this
.
options
.
maxConcurrentQueries
maxConcurrentQueries
:
this
.
options
.
maxConcurrentQueries
}
}
...
...
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