You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like it's a feature that could be added, but if you're in a hurry, you could probably do the following:
poolCluster.query=functionquery(sql,values,cb){varquery=mysql.createQuery(sql,values,cb);this.getConnection(functiononConnection(err,conn){if(err){query.on('error',function(){});query.end(err);return;}// Release connection based off eventquery.once('end',function(){conn.release();});conn.query(query);});returnquery;};
If we added a PoolCluster.prototype.query, that would be very close to what it would be :)
We're currently using the module like so:
Then in our application code:
We now wish to start using PoolCluster, changing db.js to:
PoolCluster
has no methodquery()
. We'd like to leave the application code the same but we're unsure of how to export the pool cluster.Any thoughts on how we might do that?
The text was updated successfully, but these errors were encountered: