Promise { } · Issue #1130 · brianc/node-postgres (original) (raw)

we added a new query in some existing code and now get an error:

// ---from model.js
var pg = require('pg');
var jwt = require('jsonwebtoken');
var bcrypt = require('bcrypt');
var Pool = require('pg').Pool;

var connectString = {user:"xxx", password:"xxx",
host:"localhost", database:"xxx"};
var pool = new Pool(connectString);
var exports = module.exports = {};

exports.signupsInactiveList = function() {
var data = pool.query("select * from signups");
return data;
}

// ---from test.js script:
var res = model.signupsInactiveList();
console.log(res);

all that is returned is the following:
Promise { }

since we are not specifying any promises, don't know where this is coming from except maybe in the node v6.5 or in the pg pooling - any ideas ?