sqlstring
sqlstring copied to clipboard
Simple SQL escape and format for MySQL
I also added tests and documentation for this new feature. This PR resolves issue #57
https://nodesecroadmap.fyi/chapter-7/query-langs.html describes this approach as part of a larger discussion about library support for safe coding practices. This is one step in a larger effort to enable connection.query`SELECT * FROM...
It appears that the issue I posted in the `mysql2` repo really points to an issue related to code within this library. [mysql2 Issue #1283](https://github.com/sidorares/node-mysql2/issues/1283) Would it make sense to...
https://github.com/mysqljs/sqlstring/blob/8f193cae10a2208010102fd50f0b61e869e14dcb/lib/SqlString.js#L39 ```js case 'bigint': return val + ''; ``` Is this the only required change?
Adds tags to be used with template strings. Some examples can be found in the README. Add tags: - escapeId - escapeIdForbidQualified - escapeWithOptions (allows specifying arguments to SqlString.escape) -...
SqlString.escape maps both JavaScript `null` and `undefined` to MySQL `NULL`. This change proposes JavaScript `undefined` be mapped to MySQL `DEFAULT`, as per feature request mysqljs/mysql#559 and as discussed in mysqljs/mysql#1568.
fix https://github.com/sidorares/node-mysql2/issues/2528