mm_mysql 1.7.6 → 1.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/sql.js +4 -1
package/package.json
CHANGED
package/sql.js
CHANGED
|
@@ -275,7 +275,7 @@ Sql.prototype.addOrSetSql = async function(where, set, like) {
|
|
|
275
275
|
}
|
|
276
276
|
} else {
|
|
277
277
|
for (var k in set) {
|
|
278
|
-
key += "," + k;
|
|
278
|
+
key += "," + escapeId(k);
|
|
279
279
|
var val = set[k];
|
|
280
280
|
if (val && typeof(val) === "string") {
|
|
281
281
|
val = val.trim("'");
|
|
@@ -285,6 +285,9 @@ Sql.prototype.addOrSetSql = async function(where, set, like) {
|
|
|
285
285
|
}
|
|
286
286
|
return await this.addSql(key.replace(",", ""), value.replace(",", ""));
|
|
287
287
|
}
|
|
288
|
+
if (typeof(set) === "object") {
|
|
289
|
+
set = await this.toSet(set);
|
|
290
|
+
}
|
|
288
291
|
return await this.setSql(where, set);
|
|
289
292
|
};
|
|
290
293
|
|