PoolConfig.js 485 B

123456789101112131415
  1. var ConnectionConfig = require('./ConnectionConfig');
  2. module.exports = PoolConfig;
  3. function PoolConfig(options) {
  4. this.connectionConfig = new ConnectionConfig(options);
  5. this.createConnection = options.createConnection || undefined;
  6. this.waitForConnections = (options.waitForConnections === undefined)
  7. ? true
  8. : Boolean(options.waitForConnections);
  9. this.connectionLimit = (options.connectionLimit === undefined)
  10. ? 10
  11. : Number(options.connectionLimit);
  12. }