diff --git a/lib/sqlite.core.js b/lib/sqlite.core.js index d1c2e741..e64e0070 100644 --- a/lib/sqlite.core.js +++ b/lib/sqlite.core.js @@ -56,7 +56,7 @@ let nextTick = setImmediate || function(fun) { if (global.window) { nextTick = window.setImmediate || function(fun) { window.setTimeout(fun, 0); - }; + }; } /* @@ -94,6 +94,12 @@ plugin.log = function(...messages) { } } +plugin.error = function(...message) { + if (plugin.sqlitePlugin.DEBUG) { + console.error(...message); + } +} + SQLitePlugin = function(openargs, openSuccess, openError) { var dbname; if (!(openargs && openargs['name'])) { @@ -501,10 +507,6 @@ SQLitePluginTransaction.prototype.addStatement = function(sql, values, success, } else if (t === 'boolean') { //Convert true -> 1 / false -> 0 params.push(~~v); - } - else if (t !== 'function') { - params.push(v.toString()); - plugin.warn('addStatement - parameter of type <'+t+'> converted to string using toString()') } else { let errorMsg = 'Unsupported parameter type <'+t+'> found in addStatement()'; plugin.error(errorMsg); @@ -598,7 +600,7 @@ SQLitePluginTransaction.prototype.run = function() { } }; }; - + i = 0; callbacks = []; while (i < batchExecutes.length) {