小编Joh*_*noy的帖子

使用objection.js将数组数据批量插入mysql数据库

我有一个数组

newData = [{ sId: 'XXXXXX', itemlName: 'LS????', iCode: 'XXXXXX', iType: '', skus: 'XXXXXXX', iLevel: 'L2', cCode: '88', cName: 'Other', sCode: '999', sName: 'No Control', pLengthCode: '988', core: 'N', sCode: '1', dCode: 'XX', gDeptCode: 'XX', gDeptName: 'Women\\\'s Items', rCode: 'jqs' },{ sId: 'XXXXXX', itemlName: 'LS????', iCode: 'XXXXXX', iType: '', skus: 'XXXXXXX', iLevel: 'L2', cCode: '88', cName: 'Other', sCode: '999', sName: 'No Control', pLengthCode: '988', core: 'N', sCode: '1', dCode: 'XX', gDeptCode: 'XX', gDeptName: 'Women\\\'s Items', rCode: 'jqs' }]
Run Code Online (Sandbox Code Playgroud)

我想newData …

mysql node.js knex.js objection.js

4
推荐指数
2
解决办法
5356
查看次数

标签 统计

knex.js ×1

mysql ×1

node.js ×1

objection.js ×1