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
Using WHERE + ? + null may lead to unexpected results
varsql=SqlString.format('DELETE FROM posts WHERE ?',{id: null});console.log(sql);//DELETE FROM posts WHERE `id` = NULL//will do nothing (unexpected), need to use IS NULL instead
varsql=SqlString.format('DELETE FROM posts WHERE ?',{id: 1});console.log(sql);//DELETE FROM posts WHERE `id` = 1//will do (expected)
I know it's not exactly this package problem, because the query is still correct, but it may be worth mentioning this in the docs.
The text was updated successfully, but these errors were encountered:
Objects are turned into key = 'val' pairs for each enumerable property on the object. If the property's value is a function, it is skipped; if the property's value is an object, toString() is called on it and the returned value is used.
Using WHERE + ? + null may lead to unexpected results
I know it's not exactly this package problem, because the query is still correct, but it may be worth mentioning this in the docs.
The text was updated successfully, but these errors were encountered: