Closed ghost closed 7 years ago
Pool does not return a promise. It returns a pool object. When you call .query
it then returns a promise
Good point! :-) I was trying to simply replace createConnection by createPool, and somehow though they would both return a promise. Thanks!
Seems like createPool does not work. It is not returning a promise. It returns: { pool: { domain: null, _events: {}, _maxListeners: 10, config: { acquireTimeout: 10000, connectionConfig: [Object], waitForConnections: true, connectionLimit: 10, queueLimit: 0 }, _acquiringConnections: [], _allConnections: [], _freeConnections: [], _connectionQueue: [], _closed: false } }