Skip to content

Commit

Permalink
cordova-sqlite-storage 2.6.0 with SQLite 3.26.0
Browse files Browse the repository at this point in the history
with security update and support for window functions

using cordova-sqlite-storage-dependencies@1.2.1

and add another upcoming breaking change

Resolves #837
  • Loading branch information
Christopher J. Brody committed Dec 17, 2018
1 parent 70eaa9d commit c99460e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

### cordova-sqlite-storage 2.6.0

- Use cordova-sqlite-storage-dependencies 1.2.1 with SQLite 3.26.0, with a security update and support for window functions

### cordova-sqlite-storage 2.5.2

- Ignore Android end transaction error when closing for androidDatabaseProvider: 'system' setting, to avoid possible crash during app shutdown (<https://github.com/litehelpers/Cordova-sqlite-storage/issues/833>)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ New release in December 2018 will include the following major enhancements ([lit

- drop support for Android pre-4.4 (Android 4.4 with old `armeabi` CPU to be deprecatd with limited updates in the future) ([litehelpers/Cordova-sqlite-storage#771](https://github.com/litehelpers/Cordova-sqlite-storage/issues/771))
- error `code` will always be `0` (which is already the case on Windows); actual SQLite3 error code will be part of the error `message` member whenever possible ([litehelpers/Cordova-sqlite-storage#821](https://github.com/litehelpers/Cordova-sqlite-storage/issues/821))
- use [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) build option which disables a few features that "allow ordinary SQL to deliberately corrupt the database file" ([xxxx/xxx#xxx](https://github.com/litehelpers/Cordova-sqlite-storage/issues/838))
- Values with U+0000 (null character) will be truncated on all platforms ([litehelpers/Cordova-sqlite-storage#822](https://github.com/litehelpers/Cordova-sqlite-storage/issues/822))
- drop support for iOS 8.x (was already dropped by cordova-ios@4.4.0)
- drop support for location: 0-2 values in openDatabase call (please use `location: 'default'` or `iosDatabaseLocation` setting in openDatabase as documented below)
Expand Down Expand Up @@ -204,7 +205,7 @@ See the [Sample section](#sample) for a sample with a more detailed explanation
- Cordova versions older than `6.0.0` are missing the `cordova-ios@4.0.0` security fixes.
- This plugin version uses a `before_plugin_install` hook to install sqlite3 library dependencies from `cordova-sqlite-storage-dependencies` via npm.
- Use of other systems such as Cordova Plugman, PhoneGap CLI, PhoneGap Build, and Intel XDK is no longer supported by this plugin version since they do not honor the `before_plugin_install` hook. The supported solution is to use [litehelpers / Cordova-sqlite-evcore-extbuild-free](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free) (GPL or commercial license terms); deprecated alternative with permissive license terms is available at: [brodybits / cordova-sqlite-legacy-build-support](https://github.com/brodybits/cordova-sqlite-legacy-build-support) (very limited testing, very limited updates).
- SQLite `3.22.0` included when building (all platforms), with the following compile-time definitions:
- SQLite `3.26.0` included when building (all platforms), with the following compile-time definitions:
- `SQLITE_THREADSAFE=1`
- `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE build setting) ref: [litehelpers/Cordova-sqlite-storage#736](https://github.com/litehelpers/Cordova-sqlite-storage/issues/736)
- `SQLITE_DEFAULT_MEMSTATUS=0`
Expand Down Expand Up @@ -255,7 +256,8 @@ See the [Sample section](#sample) for a sample with a more detailed explanation

## Announcements

- Using recent version of SQLite3 (`3.22.0`) with `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE) build setting to be extra robust against possible database corruption ref: [litehelpers/Cordova-sqlite-storage#736](https://github.com/litehelpers/Cordova-sqlite-storage/issues/736)
- Using recent version of SQLite3 (`3.26.0`) with a security update ([litehelpers/Cordova-sqlite-storage#837](https://github.com/litehelpers/Cordova-sqlite-storage/issues/837)) and window functions
- Using `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE) build setting to be extra robust against possible database corruption ref: [litehelpers/Cordova-sqlite-storage#736](https://github.com/litehelpers/Cordova-sqlite-storage/issues/736)
- Nice overview of alternatives for storing local data in Cordova apps at: <https://www.sitepoint.com/storing-local-data-in-a-cordova-app/>
- New alternative solution for small data storage: [TheCocoaProject / cordova-plugin-nativestorage](https://github.com/TheCocoaProject/cordova-plugin-nativestorage) - simpler "native storage of variables" for Android/iOS/Windows
- Resolved Java 6/7/8 concurrent map compatibility issue reported in [litehelpers/Cordova-sqlite-storage#726](https://github.com/litehelpers/Cordova-sqlite-storage/issues/726), THANKS to pointer by [@NeoLSN (Jason Yang/楊朝傑)](https://github.com/NeoLSN) in [litehelpers/Cordova-sqlite-storage#727](https://github.com/litehelpers/Cordova-sqlite-storage/issues/727).
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-sqlite-storage",
"version": "2.5.2",
"version": "2.6.0",
"description": "Native interface to SQLite for PhoneGap/Cordova",
"cordova": {
"id": "cordova-sqlite-storage",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/litehelpers/Cordova-sqlite-storage",
"dependencies": {
"cordova-sqlite-storage-dependencies": "1.2.0"
"cordova-sqlite-storage-dependencies": "1.2.1"
},
"scripts": {
"start": "node scripts/prepareSpec.js"
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-sqlite-storage"
version="2.5.2">
version="2.6.0">

<name>Cordova sqlite storage plugin</name>

Expand Down
2 changes: 1 addition & 1 deletion spec/www/spec/sqlite-version-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var mytests = function() {
expect(rs).toBeDefined();
expect(rs.rows).toBeDefined();
expect(rs.rows.length).toBe(1);
expect(rs.rows.item(0).myResult).toBe('3.22.0');
expect(rs.rows.item(0).myResult).toBe('3.26.0');

// Close (plugin only) & finish:
(isWebSql) ? done() : db.close(done, done);
Expand Down

0 comments on commit c99460e

Please sign in to comment.