diff --git a/lib/sqlite.core.js b/lib/sqlite.core.js index 8d24b403..4df7eb7f 100644 --- a/lib/sqlite.core.js +++ b/lib/sqlite.core.js @@ -420,7 +420,11 @@ SQLitePluginTransaction.prototype.addStatement = function(sql, values, success, t = typeof v; if (v === null || v === void 0 || t === 'number' || t === 'string'){ params.push(v); - } else if (t !== 'function') { + } else if (t === 'boolean') { + //Convert true -> 1 / false -> 0 + params.push(~~v); + } + else if (t !== 'function') { params.push(v.toString()); console.warn('addStatement - parameter of type <'+t+'> converted to string using toString()') } else { @@ -738,7 +742,7 @@ SQLiteFactory.prototype.deleteDatabase = function(first,success, error) { console.log("deleteDatabase error handler not provided: ",e); } }; - + plugin.exec("delete",args,mysuccess,myerror); };