multi-db-orm 2.1.13 → 2.1.15

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.
@@ -183,7 +183,15 @@ class MySQLDB extends MultiDbORM {
183
183
  where = where + `${key} = '${filter[key]}' AND `;
184
184
  }
185
185
  for (var key in object) {
186
- vals = vals + ` ${key} = '${object[key]}',`;
186
+ let val = object[key]
187
+ if (typeof val == 'object')
188
+ val = vals + `${key} = '${JSON.stringify(object[key])}',`
189
+ if ( val == "undefined" || val == undefined || val == 'null'|| val == null)
190
+ vals = vals + `${key} = Null,`;
191
+ else if (typeof val == 'boolean')
192
+ vals = vals + `${key} = ${val},`;
193
+ else
194
+ vals = vals + `${key} = '${val}',`;
187
195
  }
188
196
  where = where + " 1 ";
189
197
  vals = vals.substring(0, vals.length - 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-db-orm",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "CRUD , Backup , Restore and Migration library for multiple databases",
5
5
  "main": "index.js",
6
6
  "dependencies": {