Closed danjger closed 6 years ago
This feature is not supported on purpose. The more expressive https://hiddentao.com/squel/ is what you want to use when you outgrow the simple replacements provided here.
On that note we really should get https://hiddentao.com/squel/ added to the README.
Why, then is this module a dependency of mysql? most people will inherit this by default so why not support a larger feature set here? I'll take a look at the alternative you suggest but I still think this simple upgrade isn't a violation of the goals of this library.
The MySql module is just a raw db driver and so only provides the simplest options. If you want more then the purpose is to use a higher level library / orm.
There is no support for dynamic object list expansion in the WHERE clause using this library. I added a new placeholder
?&
that tells the.escape()
function via a fourth parameter to use the wordand
instead of the default,
to separate lists of values or arrays of objects. This allows the use of lists of objects in the WHERE clause correctly. This addresses this issue in stackoverflow: https://stackoverflow.com/questions/45380149/node-mysql-multiple-where-with-and-clause