multi-db-orm 2.1.23 → 2.1.24

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.
@@ -157,6 +157,7 @@ class MySQLDB extends MultiDbORM {
157
157
  let val = object[key]
158
158
  if (typeof val == 'object')
159
159
  val = JSON.stringify(object[key])
160
+ val = this.pool.escape(val)
160
161
  if (typeof val == "undefined")
161
162
  vals = vals + `Null,`;
162
163
  else if (typeof val == 'boolean')
@@ -192,6 +193,10 @@ class MySQLDB extends MultiDbORM {
192
193
  }
193
194
  for (var key in object) {
194
195
  let val = object[key]
196
+ if (typeof val == 'object' && val != undefined && val != null)
197
+ val = JSON.stringify(object[key])
198
+ val = this.pool.escape(val)
199
+
195
200
  if ( val == "undefined" || val == undefined || val == 'null'|| val == null)
196
201
  vals = vals + `${key} = Null,`;
197
202
  else if (typeof val == 'object')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-db-orm",
3
- "version": "2.1.23",
3
+ "version": "2.1.24",
4
4
  "description": "CRUD , Backup , Restore and Migration library for multiple databases",
5
5
  "main": "index.js",
6
6
  "dependencies": {