diff --git a/CHANGES.md b/CHANGES.md index da4c38954..9386d41f0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,8 @@ # Changes -##### cordova-sqlite-legacy-core 1.0.7-pre5 +##### cordova-sqlite-legacy-core 1.0.7 +- Add error info text in case of close error on Windows - Signal INTERNAL ERROR in case of attempt to reuse db on Windows (should never happen due to workaround solution to BUG 666) - SQLITE_DEFAULT_CACHE_SIZE build flag fix for macOS ("osx") and Windows diff --git a/package.json b/package.json index e6853d8b2..9ba6affb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-sqlite-legacy-core", - "version": "1.0.7-pre5", + "version": "1.0.7", "description": "Native interface to SQLite for PhoneGap/Cordova (legacy core version branch)", "cordova": { "id": "cordova-sqlite-legacy-core", diff --git a/plugin.xml b/plugin.xml index a06e29074..72fd716f5 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.0.7"> Cordova sqlite storage plugin - legacy core version branch diff --git a/src/windows/sqlite-proxy.js b/src/windows/sqlite-proxy.js index 6065fab1e..90755a4a8 100644 --- a/src/windows/sqlite-proxy.js +++ b/src/windows/sqlite-proxy.js @@ -63,20 +63,24 @@ module.exports = { var options = args[0]; var res; try { - //res = SQLitePluginRT.SQLitePlugin.closeAsync(JSON.stringify(options)); var dbname = options.path; + nextTick(function() { - if (!!dbmap[dbname] && dbmap[dbname].close() == 0) { + var rc = 0; + var db = dbmap[dbname]; + + if (!db) { + fail("CLOSE ERROR: cannot find db object for dbname: " + dbname); + } else if ((rc = db.close()) !== 0) { + fail("CLOSE ERROR CODE: " + rc); + } else { delete dbmap[dbname]; win(); - } else { - fail(); // XXX TODO REPORT ERROR } }); - } catch (ex) { + } catch (ex) { fail(ex); } - //handle(res, win, fail); }, backgroundExecuteSqlBatch: function(win, fail, args) { var options = args[0];