diff --git a/lib/Result.js b/lib/Result.js index 8e03b96..4fb79a3 100644 --- a/lib/Result.js +++ b/lib/Result.js @@ -16,9 +16,9 @@ class Result { * @param {Array} [rows] - the data rows of the result * @param {Array} [columns] - the column names in the result */ - constructor (rows, columns) { - this._rows = (rows == null) ? [] : rows; - this._columns = (columns == null) ? [] : columns; + constructor (rows=[], columns=[]) { + this._rows = rows; + this._columns = columns; // If columns aren't explicitly given, // get the list from the first row's keys diff --git a/lib/adapters/Pg/index.js b/lib/adapters/Pg/index.js index f0a653d..c20cdb3 100644 --- a/lib/adapters/Pg/index.js +++ b/lib/adapters/Pg/index.js @@ -1,6 +1,6 @@ 'use strict'; -const Pg = require('./pg'); +const Pg = require('./Pg'); module.exports = config => { return new Pg(config.connection);