How to use pg-pool - 2 common examples

To help you get started, we’ve selected a few pg-pool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jbaudanza / rxeventstore / src / database / pg.js View on Github external
constructor(databaseURL, config) {
    if (arguments.length === 1 && typeof databaseURL === 'object') {
      this.config = databaseURL;
      databaseURL = undefined;
    } else {
      this.config = Object.assign(
          {},
          configFromURL(databaseURL),
          config
      );
    }

    this.pool = new Pool(this.config);
    this.notifier = new PgNotifier(this.pool);
  }
github brianc / node-postgres / lib / pool-factory.js View on Github external
var BoundPool = function(options) {
    var config = { Client: Client };
    for (var key in options) {
      config[key] = options[key];
    }
    Pool.call(this, config);
  };

pg-pool

Connection pool for node-postgres

MIT
Latest version published 26 days ago

Package Health Score

86 / 100
Full package analysis

Popular pg-pool functions