mysql
mysql copied to clipboard
Connection Options for pool.getConnection
Would be nice if we could specify various options specific to an acquired pool connection.
I'm specifically interested in debug
, trace
and multipleStatements
though some of the encoding/formatting options would probably be welcome.
I understand the risk of multi-statements, but for my use case, its to setup the db on install so the risk is nil short of my own blunders.
Suggested format would be:
pool.getConnection([options], callback);
To be clear, these options would override the options specified when creating the pool and be for the specific connection returned by be the getConnection()
yh I agree @SReject
Sounds fine to me. PR welcome, of course. I will try to code the change at some point as well, but a PR will speed up when it will happen, haha. If you need a different option frequently it is likely better to use multiple pool, but I can see how this is useful for a single one off (like app init process or such).