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

Commit 831fe40e by Jan Aagaard Meier

Merge pull request #726 from durango/bigint

Better BigInt support for PostgreSQL.
2 parents 3c14f562 f1c62abf
Showing with 4 additions and 0 deletions
...@@ -10,6 +10,10 @@ module.exports = (function() { ...@@ -10,6 +10,10 @@ module.exports = (function() {
this.pooling = (!!this.config.poolCfg && (this.config.poolCfg.maxConnections > 0)) this.pooling = (!!this.config.poolCfg && (this.config.poolCfg.maxConnections > 0))
this.pg = this.config.native ? require('pg').native : require('pg') this.pg = this.config.native ? require('pg').native : require('pg')
// Better support for BigInts
// https://github.com/brianc/node-postgres/issues/166#issuecomment-9514935
this.pg.types.setTypeParser(20, String);
// set pooling parameters if specified // set pooling parameters if specified
if (this.pooling) { if (this.pooling) {
this.pg.defaults.poolSize = this.config.poolCfg.maxConnections this.pg.defaults.poolSize = this.config.poolCfg.maxConnections
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!