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
I'm using node-mysql in partnership with node-mysql-libmysqlclient, and one of the things I like about using node-mysql is that I can use it for building Querys, but as of right now only escape and escapeId are exposed. It would seem useful and not harmful to expose SqlString.format as well. I've added it in to my index.js right now and am using it as such.
exports.format=SqlString.format;
I can submit a pull request if preferred, I just thought this might be an simple change and useful to the community.
As a further example I can then use it in my code as such, with a simple prepare method:
I'm using node-mysql in partnership with node-mysql-libmysqlclient, and one of the things I like about using node-mysql is that I can use it for building Querys, but as of right now only escape and escapeId are exposed. It would seem useful and not harmful to expose SqlString.format as well. I've added it in to my index.js right now and am using it as such.
I can submit a pull request if preferred, I just thought this might be an simple change and useful to the community.
As a further example I can then use it in my code as such, with a simple prepare method:
This also allows me to log the SQL query once prepared as well which is nice.
The text was updated successfully, but these errors were encountered: