diff --git a/CHANGES.md b/CHANGES.md index ea0a1de7f..119a36f41 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +# cordova-sqlite-express-wip 1.0.0-pretest01 + +New version branch WIP using builtin sqlite library on Android/iOS/macOS, no external sqlite3 dependencies + ## cordova-sqlite-storage 2.1.4-fixdev01 - android.database end transaction if active before closing diff --git a/README.md b/README.md index 2e7029d94..b8d159b3e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Cordova/PhoneGap sqlite storage plugin +# Cordova/PhoneGap sqlite storage express WIP -Native interface to sqlite in a Cordova/PhoneGap plugin for Android, iOS, macOS, and Windows 10 (UWP), with API similar to HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/). +Native interface to sqlite in a Cordova/PhoneGap plugin for Android, iOS, macOS, ~~and Windows 10 (UWP)~~, with API similar to HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/). License terms for Android and Windows platform versions: MIT or Apache 2.0 @@ -8,13 +8,18 @@ License terms for iOS/macOS platform version: MIT only ## About this version branch -This is the common version branch which supports the most widely used features and serves as the basis for the other versions. +EXPERIMENTAL "express" version with builtin sqlite3 libraries for Android/iOS/macOS, no Windows version support -This version branch uses a `before_plugin_install` hook to install sqlite3 library dependencies from `cordova-sqlite-storage-dependencies` via npm. +XXX TODO: +- update tests for actual behavior of builtin android.database implementation +- update this documentation +- update description in package.json & plugin.xml + diff --git a/package.json b/package.json index d4642a500..e1a286bc1 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "cordova-sqlite-storage", - "version": "2.1.4-fixdev01", + "name": "cordova-sqlite-express-wip", + "version": "1.0.0-pretest01", "description": "Native interface to SQLite for PhoneGap/Cordova", "cordova": { - "id": "cordova-sqlite-storage", + "id": "cordova-sqlite-express-wip", "platforms": [ "android", "ios", diff --git a/plugin.xml b/plugin.xml index 1310e54dc..0b554bbea 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,8 +1,8 @@ + id="cordova-sqlite-express-wip" + version="1.0.0-pretest01"> Cordova sqlite storage plugin @@ -13,9 +13,6 @@ Native interface to SQLite for PhoneGap/Cordova. Allows you to use more storage and provides more flexibility than the standard Web SQL database (window.openDatabase). Litehelpers/Various - - - @@ -31,16 +28,7 @@ - - - - - - - - - - + @@ -59,9 +47,7 @@ - - + @@ -80,28 +66,7 @@ - - - - - - - - - - - - - - - - - - + diff --git a/spec/www/spec/sqlite-version-test.js b/spec/www/spec/sqlite-version-test.js index 0ede7faee..73bd1a79c 100755 --- a/spec/www/spec/sqlite-version-test.js +++ b/spec/www/spec/sqlite-version-test.js @@ -50,7 +50,7 @@ var mytests = function() { describe(suiteName + 'basic sqlite version test(s)', function() { - it(suiteName + 'Check sqlite version (pattern ONLY for WebKit Web SQL & androidDatabaseImplementation: 2)', function(done) { + it(suiteName + 'Check sqlite version (pattern ONLY IN THIS VERSION BRANCH)', function(done) { var db = openDatabase("check-sqlite-version.db", "1.0", "Demo", DEFAULT_SIZE); expect(db).toBeDefined(); @@ -64,9 +64,10 @@ var mytests = function() { expect(rs.rows.length).toBe(1); // Check pattern (both Web SQL & plugin) expect(rs.rows.item(0).myResult).toMatch(/3\.[0-9]+\.[0-9]+/); + // XXX GONE IN THIS VERSION BRANCH: // Check specific [plugin only]: - if (!isWebSql && !(!isWindows && isAndroid && isImpl2)) - expect(rs.rows.item(0).myResult).toBe('3.15.2'); + //* if (!isWebSql && !(!isWindows && isAndroid && isImpl2)) + //* expect(rs.rows.item(0).myResult).toBe('3.15.2'); // Close (plugin only) & finish: (isWebSql) ? done() : db.close(done, done); diff --git a/src/android/io/sqlc/SQLitePlugin.java b/src/android/io/sqlc/SQLitePlugin.java index 1f534479b..5bb1af24e 100755 --- a/src/android/io/sqlc/SQLitePlugin.java +++ b/src/android/io/sqlc/SQLitePlugin.java @@ -216,7 +216,7 @@ private SQLiteAndroidDatabase openDatabase(String dbname, CallbackContext cbc, b Log.v("info", "Open sqlite db: " + dbfile.getAbsolutePath()); - SQLiteAndroidDatabase mydb = old_impl ? new SQLiteAndroidDatabase() : new SQLiteConnectorDatabase(); + SQLiteAndroidDatabase mydb = new SQLiteAndroidDatabase(); mydb.open(dbfile); if (cbc != null) // XXX Android locking/closing BUG workaround