Skip to content

Commit 7543f4d

Browse files
authored
Merge pull request #13 from OutSystems/feat/RNMT-6247/update-sqlite
RNMT-6247 Update SQLite to version 3.40.0
2 parents 0d1fb9c + dbf88b4 commit 7543f4d

13 files changed

Lines changed: 429 additions & 44 deletions

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- Extracted from DroidGap by @brodybits (Chris Brody)
1818
- Transaction batch processing of Android version by @marcucio
19+
- Complex NDK response type enhancements to android-sqlite-native-ndk-connector and android-sqlite-ndk-native-driver by @luissilvaos (Luis Silva) of OutSystems
1920
- Maintained by @brodybits (Chris Brody)
2021
- Fixes to support old Android versions by @nolanlawson
2122
- Thanks to Mark Oppenheim <mark.oppenheim@mnetics.co.uk> for fixes to open/close callbacks and repeated open/close/delete operations

CHANGES.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
### cordova-sqlite-storage 3.2.0-OS
1313
- Added support for multiple connections to the same database (enable some concurrency)
1414

15+
#### cordova-sqlite-storage 6.1.0
16+
17+
- SQLite 3.40.0 update from cordova-sqlite-storage-dependencies@4.1.0
18+
1519
#### cordova-sqlite-storage 6.0.0
1620

17-
- use cordova-sqlite-storage-dependencies@4.0.0 with Android JARs built from android-sqlite-native-ndk-connector and android-sqlite-ndk-native-driver, with enhancements by Luis Silva of OutSystems needed for some Android 11 devices
21+
- use cordova-sqlite-storage-dependencies@4.0.0 with Android JARs built from android-sqlite-native-ndk-connector and android-sqlite-ndk-native-driver, with enhancements by Luis Silva of OutSystems needed for some Android 11 devices, drops support for Android pre-5.1
1822

1923
### cordova-sqlite-storage-commoncore 2.0.0
2024

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Native SQLite component with API based on HTML5/[Web SQL (DRAFT) API](http://www
1515
- browser
1616
- Android
1717
- iOS
18+
19+
and *deprecated* desktop platforms:
20+
1821
- macOS ("osx" platform)
1922
- Windows 10 (UWP) DESKTOP ~~and MOBILE~~ (see below for major limitations)
2023

@@ -51,7 +54,6 @@ in an upcoming major release - see [`storesafe/cordova-sqlite-storage#922`](http
5154

5255
some highlights:
5356

54-
- drop support for Android pre-5.1, which will also be dropped by `cordova-android`, including deprecated `armeabi` target (superseded by `armeabi-v7a`, seems to be not supported by Android 5.0) - more info in [`storesafe/cordova-sqlite-storage#922`](https://github.com/storesafe/cordova-sqlite-storage/issues/922)
5557
- error `code` will always be `0` (which is already the case on browser and Windows); actual SQLite3 error code will be part of the error `message` member whenever possible (see [`storesafe/cordova-sqlite-storage#821`](https://github.com/storesafe/cordova-sqlite-storage/issues/821))
5658
- drop support for location: 0-2 values in openDatabase call (please use `location: 'default'` or `iosDatabaseLocation` setting in openDatabase as documented below)
5759
- throw an exception in case of `androidDatabaseImplementation: 2` setting which is now superseded by `androidDatabaseProvider: 'system'` setting
@@ -211,7 +213,7 @@ See the [**Sample**](#sample) section below for a sample with a more detailed ex
211213
- A recent version of the Cordova CLI is recommended.
212214
- This plugin version uses a `before_plugin_install` hook to install sqlite3 library dependencies from [`cordova-sqlite-storage-dependencies`](https://www.npmjs.com/package/cordova-sqlite-storage-dependencies) via npm.
213215
- 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 [`storesafe/cordova-sqlite-evcore-extbuild-free`](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free) (GPL v3 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).
214-
- SQLite `3.32.3` included when building (all platforms), with the following compile-time definitions:
216+
- SQLite `3.40.0` included when building (all platforms), with the following compile-time definitions:
215217
- `SQLITE_THREADSAFE=1` (`SQLITE_THREADSAFE=0` for sql.js on browser platform)
216218
- `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE build setting) ref: [`storesafe/cordova-sqlite-storage#736`](https://github.com/storesafe/cordova-sqlite-storage/issues/736) (except for sql.js on browser platform)
217219
- `SQLITE_DEFAULT_MEMSTATUS=0` (except for sql.js on browser platform)
@@ -235,7 +237,7 @@ See the [**Sample**](#sample) section below for a sample with a more detailed ex
235237
- <https://www.sqlite.org/releaselog/3_26_0.html>
236238
- The iOS database location is now mandatory, as documented below.
237239
- This version branch supports the use of two (2) possible Android sqlite database implementations:
238-
- default: lightweight [`android-sqlite-native-ndk-connector`](https://github.com/brodybits/android-sqlite-native-ndk-connector), using SQLite3 NDK component built from [`android-sqlite-ndk-native-driver`](https://github.com/brodybits/android-sqlite-ndk-native-driver)
240+
- default: lightweight [`android-sqlite-native-ndk-connector`](https://github.com/brodybits/android-sqlite-native-ndk-connector), using SQLite3 NDK component built from [`github:brodybits/android-sqlite-ndk-native-driver` - `sqlite-storage-ndk-native-driver` branch](https://github.com/brodybits/android-sqlite-ndk-native-driver/tree/sqlite-storage-ndk-native-driver) and [`brodybits/android-sqlite-native-ndk-connector`](https://github.com/brodybits/android-sqlite-native-ndk-connector)
239241
- optional: Android system database implementation, using the `androidDatabaseProvider: 'system'` setting in `sqlitePlugin.openDatabase()` call as described in the [**Android database provider**](#android-database-provider) section below.
240242
- Support for WP8 along with Windows 8.1/Windows Phone 8.1/Windows 10 using Visual Studio 2015 is available in: [`brodybits/cordova-sqlite-legacy-build-support`](https://github.com/brodybits/cordova-sqlite-legacy-build-support)
241243
- The following features are available in [`brodybits/cordova-sqlite-ext`](https://github.com/brodybits/cordova-sqlite-ext):
@@ -262,13 +264,15 @@ See the [**Sample**](#sample) section below for a sample with a more detailed ex
262264
- Truncation issue with UNICODE `\u0000` character (same as `\0`)
263265
- INCONSISTENT error code (0) and INCORRECT error message (missing actual error info) in error callbacks ref: [`storesafe/cordova-sqlite-storage#539`](https://github.com/storesafe/cordova-sqlite-storage/issues/539)
264266
- Not possible to SELECT BLOB column values directly. It is recommended to use built-in HEX function to retrieve BLOB column values, which should work consistently across all platform implementations as well as (WebKit) Web SQL. Non-standard BASE64 function to SELECT BLOB column values in Base64 format is supported by [`brodybits/cordova-sqlite-ext`](https://github.com/brodybits/cordova-sqlite-ext) (permissive license terms) and [`storesafe/cordova-sqlite-evcore-extbuild-free`](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free) (GPL v3 or commercial license terms).
267+
- now deprecated ref: <https://github.com/apache/cordova-docs/pull/1118>; <https://lists.apache.org/thread/lqq2xoy3pjqcyl052gv0qom2f31zgg8k>
265268
- Windows platform version uses `UTF-16le` internal database encoding while the other platform versions use `UTF-8` internal encoding. (`UTF-8` internal encoding is preferred ref: [`storesafe/cordova-sqlite-storage#652`](https://github.com/storesafe/cordova-sqlite-storage/issues/652))
266269
- Known issue with database names that contain certain US-ASCII punctuation and control characters (see below)
267-
- The **macOS** platform version (**"osx" platform**) is not tested in a release build and should be considered pre-alpha with known issues:
270+
- The **macOS** platform version (**"osx" platform**) is supported with the following known limitations and issues:
271+
- now deprecated ref: <https://github.com/apache/cordova-docs/pull/1117>; <https://lists.apache.org/thread/lqq2xoy3pjqcyl052gv0qom2f31zgg8k>
268272
- `cordova prepare osx` is needed before building and running from Xcode
269-
- known issue between `cordova-osx` and Cordova CLI `10.0.0`: <https://github.com/apache/cordova-osx/issues/106>
270-
- Android platform versions supported: minimum: 4.0 (deprecated), recommended minimum: 5.1, see also: ref: <https://cordova.apache.org/docs/en/latest/guide/platforms/android/>
271-
- iOS platform versions supported: minimum 9.0 (see <https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html>); see also [**deviations section**](#deviations) below for differences between WKWebView (cordova-ios 6.0(+)) and UIWebView (cordova-ios pre-6.0)
273+
- known issue between `cordova-osx` and Cordova CLI 10.0.0(+): <https://github.com/apache/cordova-osx/issues/106>
274+
- Android platform versions supported: minimum: 5.1; see also: <https://cordova.apache.org/docs/en/latest/guide/platforms/android/>
275+
- iOS platform versions supported: see <https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html>; see also [**deviations section**](#deviations) below for differences between WKWebView (cordova-ios 6.0(+)) and UIWebView (cordova-ios pre-6.0)
272276
- FTS3, FTS4, and R-Tree features are tested and supported on all target platforms in this plugin version branch.
273277
- Default `PRAGMA journal_mode` setting (*tested*):
274278
- Android use of the `androidDatabaseProvider: 'system'` setting: `persist` (pre-8.0) / `truncate` (Android 8.0, 8.1, 10(+)) / `wal` (Android 9.0 Pie)

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-sqlite-storage",
3-
"version": "6.0.0+1.0.0",
3+
"version": "6.1.0+1.0.0",
44
"description": "Native interface to SQLite for PhoneGap / Cordova - cordova-sqlite-storage plugin version",
55
"cordova": {
66
"id": "cordova-sqlite-storage",
@@ -32,16 +32,17 @@
3232
},
3333
"homepage": "https://github.com/xpbrew/cordova-sqlite-storage",
3434
"dependencies": {
35-
"cordova-sqlite-storage-dependencies": "4.0.0"
35+
"cordova-sqlite-storage-dependencies": "4.1.0"
3636
},
3737
"scripts": {
38-
"clean-spec": "rm -rf spec/[mnp]* && git cl spec/config.xml spec/package.json && git status --ignored",
38+
"clean-spec": "rimraf spec/[mnp]* && git checkout -- spec/config.xml spec/package.json && git status --ignored",
3939
"prepare-js": "coffee -p SQLitePlugin.coffee.md > www/SQLitePlugin.js",
4040
"prepare-spec": "node scripts/prepareSpec.js"
4141
},
4242
"devDependencies": {
4343
"coffeescript": "1",
4444
"cross-spawn": "^6.0.5",
45-
"fs-extra": "^8.1.0"
45+
"fs-extra": "^8.1.0",
46+
"rimraf": "^3.0.2"
4647
}
4748
}

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
id="cordova-sqlite-storage"
5-
version="6.0.0+1.0.0">
5+
version="6.1.0+1.0.0">
66

77
<name>Cordova SQLite storage plugin - cordova-sqlite-storage plugin version</name>
88

spec/www/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
<script src="spec/db-simultaneous-tx-access-test.js"></script>
3333
<script src="spec/db-tx-multiple-update-test.js"></script>
3434
<script src="spec/tx-semantics-test.js"></script>
35+
<script src="spec/db-tx-value-bindings-test.js"></script> <!-- stored [INSERT] value binding tests -->
3536
<script src="spec/db-tx-error-handling-test.js"></script>
36-
<script src="spec/db-tx-value-bindings-test.js"></script>
3737
<script src="spec/db-tx-error-mapping-test.js"></script>
38-
<script src="spec/db-open-close-delete-test.js"></script>
39-
<script src="spec/ext-tx-blob-test.js"></script>
38+
<script src="spec/ext-tx-blob-test.js"></script> <!-- Blob object value test(s) -->
39+
<script src="spec/db-open-close-delete-test.js"></script> <!-- extended db open/close/delete testing -->
4040

4141
</head>
4242

spec/www/spec/browser-check-startup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var isAppleMobileOS = /iPhone/.test(navigator.userAgent) ||
1515
var hasMobileWKWebView = isAppleMobileOS && !!window.webkit && !!window.webkit.messageHandlers;
1616

1717
window.hasBrowser = true;
18-
window.hasWebKitWebSQL = isAndroid || (isAppleMobileOS && !hasMobileWKWebView) || isChromeBrowser;
18+
window.hasWebKitWebSQL = isAndroid || isChromeBrowser;
1919

2020
describe('Check startup for navigator.userAgent: ' + navigator.userAgent, function() {
2121
it('receives deviceready event', function(done) {

spec/www/spec/db-sql-operations-test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,9 @@ var mytests = function() {
15451545
var resultRow3 = resultSet.rows.item(2);
15461546
expect(resultRow3).toBeDefined();
15471547
expect(resultRow3.name).toBe('data_num');
1548+
1549+
// (in case this transaction runs last)
1550+
if (checkCount === expectedCheckCount) done();
15481551
});
15491552
});
15501553

0 commit comments

Comments
 (0)