function Database(config, logger) {
  this.config = config[name];
  this.config.host = this.config.host || defHost;

  this.logger = logger.addLog(name);

  // set the postgres connection string
  this.setup = 'postgres://' + this.config.user + ':' + this.config.pwd +
               '@' + this.config.host + '/' + this.config.database;

}
/**
 * Wraps a pg database object.
 *
 * @constructor
 * @param {Object} config          - a database pg configuration object
 * @param {String} config.host     - the hostname of the database server
 * @param {String} config.database - the name of the database
 * @param {String} config.user     - the username to use for the connection
 * @param {String} config.pwd      - the password to use for the connection
 */
Wraps a pg database object.
Wraps a pg database object .
function Database(config, logger) {
  this.config = config[name];
  this.config.host = this.config.host || defHost;
  this.logger = logger.addLog(name);
  this.setup = 'postgres://' + this.config.user + ':' + this.config.pwd +
               '@' + this.config.host + '/' + this.config.database;
}
function Database ( config , logger ) { this . config = config [ name ] ; this . config . host = this . config . host || defHost ; this . logger = logger . addLog ( name ) ; this . setup = 'postgres://' + this . config . user + ':' + this . config . pwd + '@' + this . config . host + '/' + this . config . database ; }
Wraps a pg database object.
Wraps a pg database object .
// set the postgres connection string