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.
- package/base/dbUtil.js +1 -1
- 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],
|