mm_mysql 1.8.6 → 1.8.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 +2 -2
- package/sql.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_mysql",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.8",
|
|
4
4
|
"description": "这是超级美眉mysql帮助函数模块,用于便捷操作mysql,使用await方式,可以避免嵌套函数",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
"url": "https://github.com/qiuwenwu/mm_mysql/issues"
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/qiuwenwu/mm_mysql#readme"
|
|
37
|
-
}
|
|
37
|
+
}
|
package/sql.js
CHANGED
|
@@ -441,7 +441,7 @@ Sql.prototype.toWhere = function(obj, like) {
|
|
|
441
441
|
});
|
|
442
442
|
where += " and " + escapeId(k.replace('_has', "")) + " in (" + vals.join(',') + ")";
|
|
443
443
|
} else if (k.endWith('_like')) {
|
|
444
|
-
where += " and " + escapeId(k) + " LIKE '%" + val.trim("'") + "%'";
|
|
444
|
+
where += " and " + escapeId(k.replace('_like', "")) + " LIKE '%" + val.trim("'") + "%'";
|
|
445
445
|
} else if (typeof(val) === "string" && !/^[0-9]+$/.test(val)) {
|
|
446
446
|
where += " and " + escapeId(k) + " LIKE '%" + val.trim("'") + "%'";
|
|
447
447
|
} else {
|
|
@@ -467,7 +467,7 @@ Sql.prototype.toWhere = function(obj, like) {
|
|
|
467
467
|
});
|
|
468
468
|
where += " and " + escapeId(k.replace('_has', "")) + " in (" + vals.join(',') + ")";
|
|
469
469
|
} else if (k.endWith('_like')) {
|
|
470
|
-
where += " and " + escapeId(k) + " LIKE '%" + val.trim("'") + "%'";
|
|
470
|
+
where += " and " + escapeId(k.replace('_like', "")) + " LIKE '%" + val.trim("'") + "%'";
|
|
471
471
|
} else {
|
|
472
472
|
where += " and " + escapeId(k) + " = " + val;
|
|
473
473
|
}
|