CodeFoodPixels / node-promise-mysql

A wrapper for mysqljs/mysql that wraps function calls with Bluebird promises.
MIT License
338 stars 64 forks source link

createPool #40

Closed ghost closed 7 years ago

ghost commented 7 years ago

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 } }

CodeFoodPixels commented 7 years ago

Pool does not return a promise. It returns a pool object. When you call .query it then returns a promise

ghost commented 7 years ago

Good point! :-) I was trying to simply replace createConnection by createPool, and somehow though they would both return a promise. Thanks!