Fix pg test and use default parameters in Result object
This commit is contained in:
parent
31b0aedc9e
commit
ad91099706
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const Pg = require('./pg');
|
||||
const Pg = require('./Pg');
|
||||
|
||||
module.exports = config => {
|
||||
return new Pg(config.connection);
|
||||
|
Loading…
Reference in New Issue
Block a user