不要怂,就是干,撸起袖子干!

Commit 24dfb123 by Sascha Depold

Merge pull request #331 from denysonique/pg.native

allow users to specify config.native in order to use the native pg client
2 parents 44455891 8edfcff5
......@@ -9,6 +9,9 @@ module.exports = (function() {
this.client = null
this.config = config || {}
this.pooling = (this.config.poolCfg != null && this.config.poolCfg.maxConnections > 0)
if (this.config.native) {
pg = pg.native
}
// set pooling parameters if specified
if (this.pooling) {
pg.defaults.poolSize = this.config.poolCfg.maxConnections
......
......@@ -37,7 +37,8 @@ module.exports = (function() {
sync: {},
logging: console.log,
omitNull: false,
queue: true
queue: true,
native: false
}, options || {})
if(this.options.logging === true) {
......@@ -54,6 +55,7 @@ module.exports = (function() {
pool : this.options.pool,
protocol: this.options.protocol,
queue : this.options.queue,
native : this.options.native,
maxConcurrentQueries: this.options.maxConcurrentQueries
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!