mm_mysql 1.7.6 → 1.7.7

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/sql.js +3 -0
  3. package/test.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_mysql",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "这是超级美眉mysql帮助函数模块,用于便捷操作mysql,使用await方式,可以避免嵌套函数",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sql.js CHANGED
@@ -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
 
package/test.js CHANGED
@@ -101,7 +101,7 @@ async function test_tpl_get() {
101
101
 
102
102
  var o = ret.list[0];
103
103
  // console.log("查询结果", o);
104
- o.user_id = await db.count() + 1;
104
+ // o.user_id = await db.count() + 1;
105
105
  o.nickname = o.nickname + ",6,7";
106
106
  o.gm = "'5";
107
107
  // // await db.add(o);