db-model-router 1.0.21 → 1.0.22

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/package.json +1 -1
  2. package/src/mysql/db.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "db-model-router",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Generative API Creation using mysql2 and express libraries in node js",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/mysql/db.js CHANGED
@@ -333,7 +333,7 @@ function getChangeParameter(row, uniqueKeys, onDuplicate = true) {
333
333
  if (queryEnd !== " ON DUPLICATE KEY UPDATE ") {
334
334
  queryEnd += ",";
335
335
  }
336
- queryEnd += "??=DATA.??";
336
+ queryEnd += "??=VALUES(??)";
337
337
  updateColumn.push(column);
338
338
  updateColumn.push(column);
339
339
  }
@@ -341,7 +341,7 @@ function getChangeParameter(row, uniqueKeys, onDuplicate = true) {
341
341
  }
342
342
  queryEnd += ";";
343
343
  return [
344
- `${queryStart} VALUES ? AS DATA ${queryEnd}`,
344
+ `${queryStart} VALUES ? ${queryEnd}`,
345
345
  insertColumn,
346
346
  updateColumn,
347
347
  ];