dborm-mysql 2.1.1 → 2.1.2

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 (2) hide show
  1. package/base/dbUtil.js +1 -1
  2. package/package.json +1 -1
package/base/dbUtil.js CHANGED
@@ -198,7 +198,7 @@ module.exports = (config, {dbCode = 733, ignoreDataError = false}) => {
198
198
  addFieldNames.push('modify_time');
199
199
  }
200
200
 
201
- let sql = `INSERT INTO ${tableName} (${addFieldNames.join(',')}) VALUES(?)`;
201
+ let sql = `INSERT INTO ${tableName} (${addFieldNames.map(field => '`' + field + '`').join(',')}) VALUES(?)`;
202
202
  let params = addFieldNames.map(fieldName => obj[fieldName]);
203
203
  return {
204
204
  params: [params],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dborm-mysql",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "a NodeJs ORM for mysql",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",