multi-db-orm
Advanced tools
Comparing version
@@ -166,3 +166,3 @@ const { MultiDbORM } = require('./multidb'); | ||
else | ||
vals = vals + `'${val}',`; | ||
vals = vals + `${val},`; | ||
} | ||
@@ -203,8 +203,6 @@ cols = cols.substring(0, cols.length - 1); | ||
vals = vals + `${key} = Null,`; | ||
else if (typeof val == 'object') | ||
val = vals + `${key} = '${JSON.stringify(object[key])}',` | ||
else if (typeof val == 'boolean') | ||
vals = vals + `${key} = ${val},`; | ||
else | ||
vals = vals + `${key} = '${val}',`; | ||
vals = vals + `${key} = ${val},`; | ||
} | ||
@@ -215,3 +213,9 @@ where = where + " 1 "; | ||
var query = `UPDATE ${modelname} SET ${vals} WHERE ${where};`; | ||
return await this.run(query); | ||
try{ | ||
return await this.run(query); | ||
}catch(e){ | ||
if(this.loglevel > 4) | ||
console.log('Error in update',e) | ||
throw e; | ||
} | ||
} | ||
@@ -218,0 +222,0 @@ |
{ | ||
"name": "multi-db-orm", | ||
"version": "2.1.24", | ||
"version": "2.1.25", | ||
"description": "CRUD , Backup , Restore and Migration library for multiple databases", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
70306
0.04%1676
0.24%1
Infinity%