Skip to content

Commit ed30ba5

Browse files
authored
use JSON.stringify for serializing object values (#120)
1 parent 1986ab4 commit ed30ba5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@themost/query",
3-
"version": "2.6.70",
3+
"version": "2.6.71",
44
"description": "@themost/query is a query builder for SQL. It includes a wide variety of helper functions for building complex SQL queries under node.js.",
55
"main": "index.js",
66
"scripts": {

utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function escape(val, stringifyObjects, timeZone) {
125125
if (stringifyObjects) {
126126
val = val.toString();
127127
} else {
128-
return objectToValues(val, timeZone);
128+
return `'${JSON.stringify(val)}'`;
129129
}
130130
}
131131
val = val.replace(STR_ESCAPE_REGEXP, function(s) {

0 commit comments

Comments
 (0)