cordova-sqlite-evmax-build-free 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +23 -1
- package/README.md +37 -32
- package/package.json +4 -7
- package/plugin.xml +10 -6
- package/spec/www/index.html +1 -0
- package/spec/www/spec/blobfrombase64-test.js +159 -0
- package/spec/www/spec/db-open-close-delete-test.js +3 -1
- package/spec/www/spec/db-tx-string-test.js +10 -13
- package/spec/www/spec/db-tx-value-bindings-test.js +6 -7
- package/spec/www/spec/sqlite-version-test.js +1 -1
- package/src/android/io/sqlc/SQLitePlugin.java +6 -3
- package/src/deps/android/sqlc-evplus-ndk-driver.jar +0 -0
- package/src/deps/common/{libb64-encode → libb64-core}/LICENSE +0 -0
- package/src/deps/common/libb64-core/README.md +31 -0
- package/src/deps/common/libb64-core/cdecode.c +93 -0
- package/src/deps/common/libb64-core/cdecode.h +29 -0
- package/src/deps/common/{libb64-encode → libb64-core}/cencode.c +0 -0
- package/src/deps/common/{libb64-encode → libb64-core}/cencode.h +0 -0
- package/src/deps/common/sqlite3-base64/README.md +18 -4
- package/src/deps/common/sqlite3-base64/sqlite3_base64.c +37 -2
- package/src/deps/common/sqlite3.c +5887 -3909
- package/src/deps/common/sqlite3.h +347 -33
- package/src/windows/SQLite3-WinRT-sync/SQLite3/SQLite3.Shared.vcxitems +7 -3
- package/src/windows/SQLite3-WinRT-sync/SQLite3/SQLite3.UWP.vcxproj +2 -2
- package/src/deps/common/libb64-encode/README.md +0 -27
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
# cordova-sqlite-evmax-build-free 0.0.5
|
|
4
|
+
|
|
5
|
+
- BLOBFROMBASE64 for other platforms from:
|
|
6
|
+
- https://github.com/brodybits/libb64-core
|
|
7
|
+
- https://github.com/brodybits/sqlite3-base64
|
|
8
|
+
- SQLite 3.38.5 update from cordova-sqlite-evplus-ext-free-dependencies@0.5.0
|
|
9
|
+
- refactor(evmax build): remove dependencies not needed in this plugin version branch
|
|
10
|
+
|
|
11
|
+
## cordova-sqlite-evmax-common-free 0.0.4-dev
|
|
12
|
+
|
|
13
|
+
- fix evmax GitHub URLs in package.json
|
|
14
|
+
|
|
15
|
+
## cordova-plugin-sqlite-evplus-ext-common-free 0.7.0
|
|
16
|
+
|
|
17
|
+
- fix condition used to close database on Android
|
|
18
|
+
|
|
19
|
+
### cordova-sqlite-evcore-common-free 0.6.0-dev
|
|
20
|
+
|
|
21
|
+
- update Windows minimum & target platform versions - BREAKING CHANGE
|
|
22
|
+
|
|
3
23
|
# cordova-sqlite-evmax-build-free 0.0.4
|
|
4
24
|
|
|
5
25
|
- SQLite 3.37.2 update from cordova-sqlite-evplus-ext-free-dependencies@0.4.2 - with resolution for a very rare & unlikely corruption issue from SQLite 3.35.0 ref: https://sqlite.org/forum/forumpost/ac381d64d8
|
|
@@ -22,7 +42,9 @@
|
|
|
22
42
|
|
|
23
43
|
## cordova-plugin-sqlite-evplus-ext-common-free 0.6.0-pre01
|
|
24
44
|
|
|
25
|
-
-
|
|
45
|
+
- updates from cordova-sqlite-evplus-ext-free-dependencies@0.3.0
|
|
46
|
+
- update evplus NDK library - solution for Android 11 with target SDK 30
|
|
47
|
+
- SQLite 3.35.5 update for all platforms
|
|
26
48
|
|
|
27
49
|
## cordova-plugin-sqlite-evplus-ext-common-free 0.5.0-pre01
|
|
28
50
|
|
package/README.md
CHANGED
|
@@ -42,7 +42,6 @@ in an upcoming major release - see [`xpbrew/cordova-sqlite-storage#922`](https:/
|
|
|
42
42
|
|
|
43
43
|
some highlights:
|
|
44
44
|
|
|
45
|
-
- ~~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 [`xpbrew/cordova-sqlite-storage#922`](https://github.com/xpbrew/cordova-sqlite-storage/issues/922)~~
|
|
46
45
|
- 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 (see [`xpbrew/cordova-sqlite-storage#821`](https://github.com/xpbrew/cordova-sqlite-storage/issues/821))
|
|
47
46
|
- drop support for location: 0-2 values in openDatabase call (please use `location: 'default'` or `iosDatabaseLocation` setting in openDatabase as documented below)
|
|
48
47
|
- throw an exception in case of `androidDatabaseImplementation: 2` setting which is now superseded by `androidDatabaseProvider: 'system'` setting
|
|
@@ -63,7 +62,7 @@ Super-premium enterprise version with additional performance and stability impro
|
|
|
63
62
|
|
|
64
63
|
### Multiple SQLite problem on Android
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
__This plugin uses non-standard [`storesafe/android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) sqlite database access implementation on Android. In case an application access the SAME database file using multiple plugins there is a risk of data corruption ref: [`storesafe/cordova-sqlite-storage#626`](https://github.com/storesafe/cordova-sqlite-storage/issues/626) as described in <http://ericsink.com/entries/multiple_sqlite_problem.html> and <https://www.sqlite.org/howtocorrupt.html>.__
|
|
67
66
|
|
|
68
67
|
The workaround is to use the `androidDatabaseProvider: 'system'` setting as described in the [Android database provider](#android-database-provider) section below:
|
|
69
68
|
|
|
@@ -200,9 +199,9 @@ See the [Sample section](#sample) for a sample with a more detailed explanation
|
|
|
200
199
|
- It may be needed to use `cordova prepare` in case of cordova-ios pre-4.3.0 (Cordova CLI `6.4.0`).
|
|
201
200
|
- Cordova versions older than `6.0.0` are missing the `cordova-ios@4.0.0` security fixes.
|
|
202
201
|
- This plugin version includes the following extra (non-standard) features:
|
|
203
|
-
- BASE64 integrated from [brodybits / sqlite3-base64](https://github.com/brodybits/sqlite3-base64), using [brodybits / libb64-
|
|
202
|
+
- BASE64 and BLOBFROMBASE64 integrated from [brodybits / sqlite3-base64](https://github.com/brodybits/sqlite3-base64), using [brodybits / libb64-core](https://github.com/brodybits/libb64-core) (based on <http://libb64.sourceforge.net/> by Chris Venter, public domain)
|
|
204
203
|
- REGEXP for Android (default Android-sqlite-connector database implementation), iOS, and macOS using [brodybits / sqlite3-regexp-cached](https://github.com/brodybits/sqlite3-regexp-cached) (based on <http://git.altlinux.org/people/at/packages/?p=sqlite3-pcre.git> by Alexey Tourbin, public domain)
|
|
205
|
-
- SQLite __`3.
|
|
204
|
+
- SQLite __`3.38.5`__ included when building (all platforms), with the following compile-time definitions:
|
|
206
205
|
- `SQLITE_THREADSAFE=1`
|
|
207
206
|
- `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE build setting) ref: [xpbrew/cordova-sqlite-storage#736](https://github.com/xpbrew/cordova-sqlite-storage/issues/736)
|
|
208
207
|
- `SQLITE_LOCKING_STYLE=1` on iOS/macOS ONLY
|
|
@@ -230,13 +229,15 @@ See the [Sample section](#sample) for a sample with a more detailed explanation
|
|
|
230
229
|
- <https://www.sqlite.org/releaselog/3_26_0.html>
|
|
231
230
|
- The iOS database location is now mandatory, as documented below.
|
|
232
231
|
- This version branch supports the use of two (2) possible Android sqlite database implementations:
|
|
233
|
-
- default: high-performance, lightweight [
|
|
232
|
+
- default: high-performance, lightweight [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) NDK library (C-language implementation)
|
|
234
233
|
- 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.
|
|
235
|
-
- The following feature is available in [
|
|
234
|
+
- The following feature is available in [brodybits/cordova-sqlite-ext](https://github.com/brodybits/cordova-sqlite-ext) (with permissive license terms, missing performance and stability enhancements from [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free)), MISSING in this plugin version:
|
|
236
235
|
- Pre-populated database (Android/iOS/macOS/Windows)
|
|
237
236
|
- Windows platform version using a customized version of the performant [doo / SQLite3-WinRT](https://github.com/doo/SQLite3-WinRT) C++ component based on the [brodybits/SQLite3-WinRT sync-api-fix branch](https://github.com/brodybits/SQLite3-WinRT/tree/sync-api-fix), with the following known limitations:
|
|
238
237
|
- This plugin version branch has dependency on platform toolset libraries included by Visual Studio 2017 ref: [xpbrew/cordova-sqlite-storage#580](https://github.com/xpbrew/cordova-sqlite-storage/issues/580). Visual Studio 2015 is now supported by [`brodybits/cordova-sqlite-legacy`](https://github.com/brodybits/cordova-sqlite-legacy) (permissive license terms, no performance enhancements for Android) and [`brodybits/cordova-sqlite-evcore-legacy-ext-common-free`](https://github.com/brodybits/cordova-sqlite-evcore-legacy-ext-common-free) (GPL or commercial license terms, with performance enhancements for Android). UNTESTED workaround for Visual Studio 2015: it *may* be possible to support this plugin version on Visual Studio 2015 Update 3 by installing platform toolset v141.)
|
|
239
238
|
- Visual Studio components needed: Universal Windows Platform development, C++ Universal Windows Platform tools. A recent version of Visual Studio 2017 will offer to install any missing feature components.
|
|
239
|
+
- Target Windows version: `10.0.17763.0` (Windows 10 build 17763 aka October 2018 Update or version 1809) ref: <https://docs.microsoft.com/en-us/windows/uwp/whats-new/windows-10-build-17763>
|
|
240
|
+
- Minimum Windows version `10.0.15063.0` (Windows 10 build 15063 aka Creators Update or version 1703) ref: <https://docs.microsoft.com/en-us/windows/uwp/whats-new/windows-10-build-15063>
|
|
240
241
|
- It is NOT possible to use this plugin with the default "Any CPU" target. A specific target CPU type MUST be specified when building an app with this plugin.
|
|
241
242
|
- ARM target CPU for Windows Mobile is no longer supported.
|
|
242
243
|
- The `SQLite3-WinRT` component in `src/windows/SQLite3-WinRT-sync` is based on [doo/SQLite3-WinRT commit f4b06e6](https://github.com/doo/SQLite3-WinRT/commit/f4b06e6a772a2688ee0575a8034b55401ea64049) from 2012, which is missing the asynchronous C++ API improvements. There is no background processing on the Windows platform.
|
|
@@ -263,11 +264,6 @@ See the [Sample section](#sample) for a sample with a more detailed explanation
|
|
|
263
264
|
- This plugin version includes a super-premium workaround to support super-large INSERT transactions on Android. It also includes premium improvements to the internal JSON interface between Javascript and native parts on Android, iOS, and macOS which improves the performance and resolves memory issues in case of some very large SQL batches and large SELECT results, with help from [`android-sqlite-evplus-ext-native-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ext-native-driver-free) on Android.
|
|
264
265
|
- This plugin version includes additional JavaScript performance enhancements with special benefit for Android.
|
|
265
266
|
- This plugin version includes the following extra (non-standard) features: BASE 64 (all platforms Android/iOS/macOS/Windows), REGEXP (Android/iOS/macOS)
|
|
266
|
-
- _Using version of SQLite3 (...) with window functions and recent security updates:_
|
|
267
|
-
- [xpbrew/cordova-sqlite-storage#895](https://github.com/xpbrew/cordova-sqlite-storage/issues/895)
|
|
268
|
-
- [xpbrew/cordova-sqlite-storage#867](https://github.com/xpbrew/cordova-sqlite-storage/issues/867)
|
|
269
|
-
- [xpbrew/cordova-sqlite-storage#837](https://github.com/xpbrew/cordova-sqlite-storage/issues/837)
|
|
270
|
-
and window functions
|
|
271
267
|
- Using `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE) build setting to be extra robust against possible database corruption ref: [xpbrew/cordova-sqlite-storage#736](https://github.com/xpbrew/cordova-sqlite-storage/issues/736)
|
|
272
268
|
- `SQLITE_DBCONFIG_DEFENSIVE` flag is used for extra SQL safety, as described above
|
|
273
269
|
- Recent build fixes:
|
|
@@ -579,32 +575,30 @@ See **Security of sensitive data** in the [Security](#security) section above.
|
|
|
579
575
|
- In case of ignored INSERT OR IGNORE statement WebKit Web SQL (Android/iOS) reports insertId with an old INSERT row id value while the plugin reports insertId: undefined.
|
|
580
576
|
- In case of a SQL error handler that does not recover the transaction, WebKit Web SQL (Android/iOS) would incorrectly report error code 0 while the plugin would report the same error code as in the SQL error handler. (In case of an error with no SQL error handler then Android/iOS WebKit Web SQL would report the same error code that would have been reported in the SQL error hander.)
|
|
581
577
|
- In case a transaction function throws an exception, the message and code if present are reported by the plugin but *not* by (WebKit) Web SQL.
|
|
582
|
-
- SQL error messages are inconsistent on Windows and less descriptive on Android in case of the default [android-sqlite-evplus-ndk-driver-free](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) implementation.
|
|
578
|
+
- SQL error messages are inconsistent on Windows and less descriptive on Android in case of the default [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) implementation.
|
|
583
579
|
- There are some other differences in the SQL error messages reported by WebKit Web SQL and this plugin.
|
|
584
580
|
|
|
585
581
|
<!-- END Deviations -->
|
|
586
582
|
|
|
587
583
|
## Known issues
|
|
588
584
|
|
|
589
|
-
- Possible crashes
|
|
585
|
+
- Possible crashes with certain cases of invalid binary string data on Android
|
|
590
586
|
- The iOS/macOS platform versions do not support certain rapidly repeated open-and-close or open-and-delete test scenarios due to how the implementation handles background processing
|
|
591
|
-
-
|
|
592
|
-
- Incorrect handling of emoji and other 4-byte UTF-8 characters on Android on default [android-sqlite-evplus-ndk-driver-free](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) NDK access implementation as described in: [litehelpers/Cordova-sqlite-evcore-extbuild-free#44](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/44), [xpbrew/cordova-sqlite-storage#564](https://github.com/xpbrew/cordova-sqlite-storage/issues/564) (this is not an issue when using the `androidDatabaseProvider: 'system'` setting)
|
|
587
|
+
- The default [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation does not currently handle control characters such as vertical tab, form feed, or backspace characters properly ref: [`storesafe/cordova-sqlite-evcore-extbuild-free#28`](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues/28)
|
|
593
588
|
- It is possible to request a SQL statement list such as "SELECT 1; SELECT 2" within a single SQL statement string, however the plugin will only execute the first statement and silently ignore the others ref: [xpbrew/cordova-sqlite-storage#551](https://github.com/xpbrew/cordova-sqlite-storage/issues/551)
|
|
594
589
|
- Execution of INSERT statement that affects multiple rows (due to SELECT cause or using TRIGGER(s), for example) reports incorrect rowsAffected on Android with use of the `androidDatabaseProvider: 'system'` setting.
|
|
595
|
-
- FIXED in this plugin version: ~~Memory issue observed when adding a large number of records due to the JSON implementation which is improved in [
|
|
590
|
+
- FIXED in this plugin version: ~~Memory issue observed when adding a large number of records due to the JSON implementation which is improved in [storesafe / cordova-sqlite-evcore-extbuild-free](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free) (GPL or commercial license terms)~~
|
|
596
591
|
- Infinity (positive or negative) values are not supported on Android/iOS/macOS due to issues described above including a possible crash on iOS/macOS ref: [xpbrew/cordova-sqlite-storage#405](https://github.com/xpbrew/cordova-sqlite-storage/issues/405)
|
|
597
592
|
- A stability issue was reported on the iOS platform version when in use together with [SockJS](http://sockjs.org/) client such as [pusher-js](https://github.com/pusher/pusher-js) at the same time (see [xpbrew/cordova-sqlite-storage#196](https://github.com/xpbrew/cordova-sqlite-storage/issues/196)). The workaround is to call sqlite functions and [SockJS](http://sockjs.org/) client functions in separate ticks (using setTimeout with 0 timeout).
|
|
598
|
-
-
|
|
599
|
-
-
|
|
600
|
-
|
|
601
|
-
-
|
|
602
|
-
- Issue (truncation issue) with NULL characters (`'\0\` or `'\u0000'`) on Android (default [android-sqlite-evplus-ndk-driver-free](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation) and Windows ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#27](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/27)
|
|
593
|
+
- Hanging transactions in case of special JSON characters in result columns default [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation ref: [`storesafe/cordova-sqlite-evcore-extbuild-free#51`](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues/51)
|
|
594
|
+
- SQL errors are reported with incorrect & inconsistent error message on Windows - error message info not always correct, see also [storesafe/cordova-sqlite-storage#539](https://github.com/storesafe/cordova-sqlite-storage/issues/539)
|
|
595
|
+
- Issue on default [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation in case of database file name with multi-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#25](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/25)
|
|
596
|
+
- Incorrect handling of NULL characters (`'\0\` or `'\u0000'`) on Android (default [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation) and Windows ref: [`storesafe/cordova-sqlite-evcore-extbuild-free#27`](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues/27)
|
|
603
597
|
- Close/delete database bugs described below.
|
|
604
598
|
- When a database is opened and deleted without closing, the iOS/macOS platform version is known to leak resources.
|
|
605
|
-
- It is NOT possible to open multiple databases with the same name but in different locations
|
|
599
|
+
- It is NOT possible to open multiple databases with the same name but in different locations.
|
|
606
600
|
|
|
607
|
-
|
|
601
|
+
Some additional issues are tracked in [open cordova-sqlite-storage bug-general issues](https://github.com/storesafe/cordova-sqlite-storage/issues?q=is%3Aissue+is%3Aopen+label%3Abug-general), [open cordova-sqlite-evcore-extbuild-free bug-general issues](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues?q=is%3Aissue+is%3Aopen+label%3Abug-general), and [open cordova-plugin-sqlite-evplus-ext-common-free bug issues](https://github.com/storesafe/cordova-plugin-sqlite-evplus-ext-common-free/issues?q=is%3Aissue+is%3Aopen+label%3Abug).
|
|
608
602
|
|
|
609
603
|
<!-- END Known issues -->
|
|
610
604
|
|
|
@@ -619,11 +613,10 @@ _Some additional issues are tracked in [open cordova-sqlite-storage bug-general
|
|
|
619
613
|
- The Android platform version cannot properly support more than 100 open database files due to the threading model used.
|
|
620
614
|
- SQL error messages reported by Windows platform version are not consistent with Android/iOS/macOS platform versions.
|
|
621
615
|
- UNICODE `\u2028` (line separator) and `\u2029` (paragraph separator) characters are currently not supported and known to be broken on iOS, macOS, and Android platform versions due to JSON issues reported in [Cordova bug CB-9435](https://issues.apache.org/jira/browse/CB-9435) and [cordova/cordova-discuss#57](https://github.com/cordova/cordova-discuss/issues/57). This is fixed with a workaround for iOS/macOS in: [litehelpers / Cordova-sqlite-evplus-legacy-free](https://github.com/litehelpers/Cordova-sqlite-evplus-legacy-free) and [litehelpers / Cordova-sqlite-evplus-legacy-attach-detach-free](https://github.com/litehelpers/Cordova-sqlite-evplus-legacy-attach-detach-free) (GPL or special commercial license terms) as well as [litehelpers / cordova-sqlite-evmax-ext-workers-legacy-build-free](https://github.com/litehelpers/cordova-sqlite-evmax-ext-workers-legacy-build-free) (GPL or premium commercial license terms).
|
|
622
|
-
-
|
|
623
|
-
- Database files with certain multi-byte UTF-8 characters are not tested and not expected to work consistently across all platform implementations. The default [android-sqlite-evplus-ndk-driver-free](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation may not function properly on certain Android versions in case of database file names with emoji and other 4-byte UTF-8 characters ref: [
|
|
616
|
+
- SELECT BLOB column value type is not supported consistently across all platforms (not supported on Windows). It is recommended to use the built-in HEX function to SELECT BLOB column data in hexadecimal format, working consistently across all platforms. As an alternative: SELECT BLOB in Base64 format using BASE64 function (described elsewhere in this document) is supported by this plugin version (GPL or premium commercial license options, as documented above) as well as [`brodybits/cordova-sqlite-ext`](https://github.com/brodybits/cordova-sqlite-ext) (permissive license terms). INLINE BLOB values such as `X'010203'` are supported by the SQLite syntax on all platforms. FUTURE TBD equivalent to UNHEX (supported in MySQL) or conversion of Base-64 string to BLOB is desired.
|
|
617
|
+
- Database files with certain multi-byte UTF-8 characters are not tested and not expected to work consistently across all platform implementations. The default [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation may not function properly on certain Android versions in case of database file names with emoji and other 4-byte UTF-8 characters ref: [storesafe/cordova-sqlite-evcore-extbuild-free#26](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues/26)
|
|
624
618
|
- Issues with UNICODE `\u0000` character (same as `\0`):
|
|
625
|
-
-
|
|
626
|
-
- Truncation in case of argument value with UNICODE `\u0000` character reproduced on (WebKit) Web SQL as well as plugin on Android (default [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) implementation with [Android-sqlite-ext-native-driver](https://github.com/brodybits/Android-sqlite-ext-native-driver), using Android NDK) and Windows
|
|
619
|
+
- Truncation in case of argument value with UNICODE `\u0000` character reproduced on (WebKit) Web SQL; known issues with this plugin version as referenced above on Android (default `android-sqlite-evcore-native-driver-free` database access implementation) and Windows ([storesafe/cordova-sqlite-evcore-extbuild-free#27](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues/27))
|
|
627
620
|
- SQL error reported in case of inline value string with with UNICODE `\u0000` character on (WebKit) Web SQL, plugin on Android with use of the `androidDatabaseProvider: 'system'` setting, and plugin on _some_ other platforms
|
|
628
621
|
- Case-insensitive matching and other string manipulations on Unicode characters, which is provided by optional ICU integration in the sqlite source and working with recent versions of Android, is not supported for any target platforms.
|
|
629
622
|
- The iOS/macOS platform version uses a thread pool but with only one thread working at a time due to "synchronized" database access.
|
|
@@ -637,7 +630,7 @@ _Some additional issues are tracked in [open cordova-sqlite-storage bug-general
|
|
|
637
630
|
- Does not support named parameters (`?NNN`/`:AAA`/`@AAAA`/`$AAAA` parameter placeholders as documented in <https://www.sqlite.org/lang_expr.html#varparam> and <https://www.sqlite.org/c3ref/bind_blob.html>) ref: [xpbrew/cordova-sqlite-storage#717](https://github.com/xpbrew/cordova-sqlite-storage/issues/717)
|
|
638
631
|
- User defined functions not supported, due to problems described in [xpbrew/cordova-sqlite-storage#741](https://github.com/xpbrew/cordova-sqlite-storage/issues/741)
|
|
639
632
|
|
|
640
|
-
|
|
633
|
+
Additional limitations are tracked in [open cordova-sqlite-storage doc-todo issues](https://github.com/storesafe/cordova-sqlite-storage/issues?q=is%3Aissue+label%3Adoc-todo) and [open cordova-sqlite-evcore-extbuild-free doc-todo issues](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues?q=is%3Aissue+label%3Adoc-todo).
|
|
641
634
|
|
|
642
635
|
<!-- END Other limitations -->
|
|
643
636
|
|
|
@@ -666,7 +659,7 @@ _Additional limitations are tracked in [marked cordova-sqlite-storage doc-todo i
|
|
|
666
659
|
- Use of `?NNN`/`:AAA`/`@AAAA`/`$AAAA` parameter placeholders as documented in <https://www.sqlite.org/lang_expr.html#varparam> and <https://www.sqlite.org/c3ref/bind_blob.html>) (currently NOT supported by this plugin) ref: [xpbrew/cordova-sqlite-storage#717](https://github.com/xpbrew/cordova-sqlite-storage/issues/717)
|
|
667
660
|
- Single-statement and SQL batch transaction calls with invalid arguments (TBD behavior subject to change)
|
|
668
661
|
- Plugin vs (WebKit) Web SQL transaction behavior in case of an error handler which returns various falsy vs truthy values
|
|
669
|
-
- Other [open
|
|
662
|
+
- Other [open cordova-sqlite-storage testing issues](https://github.com/storesafe/cordova-sqlite-storage/issues?q=is%3Aissue+is%3Aopen+label%3Atesting) and [open cordova-sqlite-evcore-extbuild-free testing issues](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues?q=is%3Aissue+is%3Aopen+label%3Atesting)
|
|
670
663
|
|
|
671
664
|
<!-- END Further testing needed -->
|
|
672
665
|
|
|
@@ -747,8 +740,9 @@ FUTURE TBD: Proper date/time handling will be further tested and documented at s
|
|
|
747
740
|
- More formal documentation of API, especially for non-standard functions
|
|
748
741
|
- IndexedDBShim adapter (possibly based on IndexedDBShim)
|
|
749
742
|
- Further cleanup of [support](#support) section
|
|
750
|
-
-
|
|
751
|
-
-
|
|
743
|
+
- Resolve or document [open cordova-sqlite-storage bug-general issues](https://github.com/storesafe/cordova-sqlite-storage/issues?q=is%3Aissue+is%3Aopen+label%3Abug-general), [open cordova-sqlite-evcore-extbuild-free bug-general issues](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues?q=is%3Aissue+is%3Aopen+label%3Abug-general), and [open cordova-plugin-sqlite-evplus-ext-common-free bug issues](https://github.com/storesafe/cordova-plugin-sqlite-evplus-ext-common-free/issues?q=is%3Aissue+is%3Aopen+label%3Abug).
|
|
744
|
+
- Resolve [cordova-sqlite-storage-help doc-todo issues](https://github.com/storesafe/cordova-sqlite-storage-help/issues?q=is%3Aissue%20label%3Adoc-todo), [open cordova-sqlite-storage doc-todo issues](https://github.com/storesafe/cordova-sqlite-storage/issues?q=is%3Aissue+label%3Adoc-todo), and [open cordova-sqlite-evcore-extbuild-free doc-todo issues](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues?q=is%3Aissue+label%3Adoc-todo)
|
|
745
|
+
- Resolve [open cordova-sqlite-storage testing issues](https://github.com/storesafe/cordova-sqlite-storage/issues?q=is%3Aissue+is%3Aopen+label%3Atesting) and [open cordova-sqlite-evcore-extbuild-free testing issues](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues?q=is%3Aissue+is%3Aopen+label%3Atesting)
|
|
752
746
|
|
|
753
747
|
<!-- END Major TODOs -->
|
|
754
748
|
|
|
@@ -969,7 +963,7 @@ var db = window.sqlitePlugin.openDatabase({
|
|
|
969
963
|
(Use of the `androidDatabaseImplementation: 2` setting which is now replaced by `androidDatabaseProvider: 'system'` is now deprecated and may be removed in the near future.)
|
|
970
964
|
|
|
971
965
|
**IMPORTANT:**
|
|
972
|
-
- As described above: by default this plugin uses a non-standard [android-sqlite-evplus-ndk-driver-free](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation on Android. In case an application access the **same** database using multiple plugins there is a risk of data corruption (ref: [
|
|
966
|
+
- As described above: by default this plugin uses a non-standard [`android-sqlite-evplus-ndk-driver-free`](https://github.com/storesafe/android-sqlite-evplus-ndk-driver-free) database access implementation on Android. In case an application access the **same** database using multiple plugins there is a risk of data corruption (ref: [storesafe/cordova-sqlite-storage#626](https://github.com/storesafe/cordova-sqlite-storage/issues/626)) as described in <http://ericsink.com/entries/multiple_sqlite_problem.html> and <https://www.sqlite.org/howtocorrupt.html>. The workaround is to use the `androidDatabaseProvider: 'system'` setting as described here.
|
|
973
967
|
- In case of the `androidDatabaseProvider: 'system'` setting, [xpbrew/cordova-sqlite-storage#193](https://github.com/xpbrew/cordova-sqlite-storage/issues/193) reported (as observed by a number of app developers in the past) that in certain Android versions, if the app is stopped or aborted without closing the database then there is an unexpected database lock and the data that was inserted is lost. The workaround is described below.
|
|
974
968
|
|
|
975
969
|
<!-- END Android database provider -->
|
|
@@ -1216,6 +1210,17 @@ db.readTransaction(function(tx) {
|
|
|
1216
1210
|
});
|
|
1217
1211
|
```
|
|
1218
1212
|
|
|
1213
|
+
### INSERT BLOB data from BASE64 string value
|
|
1214
|
+
|
|
1215
|
+
```Javascript
|
|
1216
|
+
db.transaction(function(tx) {
|
|
1217
|
+
tx.executeSql("INSERT INTO MyTable (data) VALUES (BLOBFROMBASE64(?))", ["AQID"], function(tx, resultSet) {
|
|
1218
|
+
console.log("insertId: " + resultSet.insertId + " -- probably 1");
|
|
1219
|
+
console.log("rowsAffected: " + resultSet.rowsAffected + " -- should be 1");
|
|
1220
|
+
});
|
|
1221
|
+
});
|
|
1222
|
+
```
|
|
1223
|
+
|
|
1219
1224
|
## Background processing
|
|
1220
1225
|
|
|
1221
1226
|
The threading model depends on which platform version is used:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cordova-sqlite-evmax-build-free",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Cordova/PhoneGap sqlite storage - free evmax enterprise version with premium stability and performance improvements including workaround for super-large INSERT transactions & SELECT results on Android (version with external sqlite3 dependencies)",
|
|
5
5
|
"cordova": {
|
|
6
6
|
"id": "cordova-sqlite-evmax-common-free",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/storesafe/cordova-sqlite-evmax-build-free.git"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"sqlite",
|
|
@@ -26,12 +26,9 @@
|
|
|
26
26
|
"author": "various",
|
|
27
27
|
"license": "GPL-3.0 OR Commercial",
|
|
28
28
|
"bugs": {
|
|
29
|
-
"url": "https://github.com/
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://github.com/brodybits/cordova-sqlite-evmax-build-free",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"cordova-sqlite-evplus-ext-free-dependencies": "0.3.0"
|
|
29
|
+
"url": "https://github.com/storesafe/cordova-sqlite-evmax-build-free/issues"
|
|
34
30
|
},
|
|
31
|
+
"homepage": "https://github.com/storesafe/cordova-sqlite-evmax-build-free",
|
|
35
32
|
"scripts": {
|
|
36
33
|
"clean-spec": "rm -rf spec/[mnp]* && git cl spec/config.xml spec/package.json && git status --ignored",
|
|
37
34
|
"prepare-js": "coffee -p SQLitePlugin.coffee.md > www/SQLitePlugin.js",
|
package/plugin.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
|
|
3
3
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
4
|
id="cordova-sqlite-evmax-build-free"
|
|
5
|
-
version="0.0.
|
|
5
|
+
version="0.0.5">
|
|
6
6
|
|
|
7
7
|
<name>Cordova sqlite storage - free evmax common version branch with premium stability performance improvements including workaround for super-large INSERT transactions and SELECT results on Android (with external sqlite3 dependencies)</name>
|
|
8
8
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<source-file src="src/android/io/sqlc/SQLiteConnectorDatabase.java" target-dir="src/io/sqlc"/>
|
|
35
35
|
-->
|
|
36
36
|
|
|
37
|
-
<!--
|
|
37
|
+
<!-- JAR with NDK libs & Java JNI class -->
|
|
38
38
|
<lib-file src="src/deps/android/sqlc-evplus-ndk-driver.jar" />
|
|
39
39
|
</platform>
|
|
40
40
|
|
|
@@ -59,8 +59,10 @@
|
|
|
59
59
|
<header-file src="src/deps/common/sqlite3-base64/sqlite3_base64.h" />
|
|
60
60
|
<source-file src="src/deps/common/sqlite3-base64/sqlite3_base64.c" />
|
|
61
61
|
|
|
62
|
-
<header-file src="src/deps/common/libb64-
|
|
63
|
-
<source-file src="src/deps/common/libb64-
|
|
62
|
+
<header-file src="src/deps/common/libb64-core/cencode.h" />
|
|
63
|
+
<source-file src="src/deps/common/libb64-core/cencode.c" />
|
|
64
|
+
<header-file src="src/deps/common/libb64-core/cdecode.h" />
|
|
65
|
+
<source-file src="src/deps/common/libb64-core/cdecode.c" />
|
|
64
66
|
|
|
65
67
|
<header-file src="src/deps/common/sqlite3.h" />
|
|
66
68
|
<source-file src="src/deps/common/sqlite3.c"
|
|
@@ -90,8 +92,10 @@
|
|
|
90
92
|
<header-file src="src/deps/common/sqlite3-base64/sqlite3_base64.h" />
|
|
91
93
|
<source-file src="src/deps/common/sqlite3-base64/sqlite3_base64.c" />
|
|
92
94
|
|
|
93
|
-
<header-file src="src/deps/common/libb64-
|
|
94
|
-
<source-file src="src/deps/common/libb64-
|
|
95
|
+
<header-file src="src/deps/common/libb64-core/cencode.h" />
|
|
96
|
+
<source-file src="src/deps/common/libb64-core/cencode.c" />
|
|
97
|
+
<header-file src="src/deps/common/libb64-core/cdecode.h" />
|
|
98
|
+
<source-file src="src/deps/common/libb64-core/cdecode.c" />
|
|
95
99
|
|
|
96
100
|
<header-file src="src/deps/common/sqlite3.h" />
|
|
97
101
|
<source-file src="src/deps/common/sqlite3.c"
|
package/spec/www/index.html
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
<script src="spec/db-open-close-delete-test.js"></script>
|
|
39
39
|
<script src="spec/ext-tx-blob-test.js"></script>
|
|
40
40
|
<script src="spec/base64-encode-test.js"></script>
|
|
41
|
+
<script src="spec/blobfrombase64-test.js"></script>
|
|
41
42
|
<!--
|
|
42
43
|
<script src="spec/big-memory-test.js"></script>
|
|
43
44
|
- -->
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* 'use strict'; */
|
|
2
|
+
|
|
3
|
+
var MYTIMEOUT = 12000;
|
|
4
|
+
|
|
5
|
+
var DEFAULT_SIZE = 5000000; // max to avoid popup in safari/ios
|
|
6
|
+
|
|
7
|
+
var isWindows = /Windows /.test(navigator.userAgent); // Windows (...)
|
|
8
|
+
var isAndroid = !isWindows && /Android/.test(navigator.userAgent);
|
|
9
|
+
|
|
10
|
+
var scenarioList = [
|
|
11
|
+
isAndroid ? 'Plugin-implementation-default' : 'Plugin',
|
|
12
|
+
'HTML5',
|
|
13
|
+
'Plugin-implementation-2'
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
var scenarioCount = (!!window.hasWebKitBrowser) ? (isAndroid ? 3 : 2) : 1;
|
|
17
|
+
|
|
18
|
+
var mytests = function() {
|
|
19
|
+
|
|
20
|
+
for (var i=0; i<scenarioCount; ++i) {
|
|
21
|
+
|
|
22
|
+
describe(scenarioList[i] + ': BLOBFROMBASE64 encoding test(s)', function() {
|
|
23
|
+
var scenarioName = scenarioList[i];
|
|
24
|
+
var suiteName = scenarioName + ': ';
|
|
25
|
+
var isWebSql = (i === 1);
|
|
26
|
+
var isImpl2 = (i === 2);
|
|
27
|
+
|
|
28
|
+
// NOTE: MUST be defined in proper describe function scope, NOT outer scope:
|
|
29
|
+
var openDatabase = function(name, ignored1, ignored2, ignored3) {
|
|
30
|
+
if (isImpl2) {
|
|
31
|
+
return window.sqlitePlugin.openDatabase({
|
|
32
|
+
// prevent reuse of database from default db implementation:
|
|
33
|
+
name: 'i2-'+name,
|
|
34
|
+
androidDatabaseImplementation: 2,
|
|
35
|
+
androidLockWorkaround: 1,
|
|
36
|
+
iosDatabaseLocation: 'Documents'
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (isWebSql) {
|
|
40
|
+
return window.openDatabase(name, "1.0", "Demo", DEFAULT_SIZE);
|
|
41
|
+
} else {
|
|
42
|
+
return window.sqlitePlugin.openDatabase({name: name, location: 'default'});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
describe(suiteName + 'SELECT BLOBFROMBASE64 value test(s)', function() {
|
|
47
|
+
|
|
48
|
+
it(suiteName + "SELECT HEX(BLOBFROMBASE64('AQID')) [X'010203'] INLINE", function(done) {
|
|
49
|
+
if (isWebSql) pending('SKIP: BLOBFROMBASE64 not supported by Web SQL');
|
|
50
|
+
if (!isWebSql && isAndroid && isImpl2) pending("SKIP: BLOBFROMBASE64 not supported with androidDatabaseProvider: 'system'");
|
|
51
|
+
|
|
52
|
+
var db = openDatabase('SELECT-BLOBFROMBASE64-AQID-AS-HEX-VALUE-INLINE.db');
|
|
53
|
+
|
|
54
|
+
db.transaction(function(tx) {
|
|
55
|
+
tx.executeSql("SELECT HEX(BLOBFROMBASE64('AQID')) AS hex_value", [], function(ignored, rs) {
|
|
56
|
+
expect(rs).toBeDefined();
|
|
57
|
+
expect(rs.rows).toBeDefined();
|
|
58
|
+
expect(rs.rows.length).toBe(1);
|
|
59
|
+
expect(rs.rows.item(0).hex_value).toBe('010203');
|
|
60
|
+
|
|
61
|
+
// Close (plugin only) & finish:
|
|
62
|
+
(isWebSql) ? done() : db.close(done, done);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}, MYTIMEOUT);
|
|
66
|
+
|
|
67
|
+
it(suiteName + "SELECT HEX of BLOBFROMBASE64 with 'AQID' [X'010203'] parameter", function(done) {
|
|
68
|
+
if (isWebSql) pending('SKIP: BLOBFROMBASE64 not supported by Web SQL');
|
|
69
|
+
if (!isWebSql && isAndroid && isImpl2) pending("SKIP: BLOBFROMBASE64 not supported with androidDatabaseProvider: 'system'");
|
|
70
|
+
|
|
71
|
+
var db = openDatabase('SELECT-HEX-of-BLOBFROMBASE64-AQID-AS-HEX-VALUE.db');
|
|
72
|
+
|
|
73
|
+
db.transaction(function(tx) {
|
|
74
|
+
tx.executeSql("SELECT HEX(BLOBFROMBASE64(?)) AS hex_value", ['AQID'], function(ignored, rs) {
|
|
75
|
+
expect(rs).toBeDefined();
|
|
76
|
+
expect(rs.rows).toBeDefined();
|
|
77
|
+
expect(rs.rows.length).toBe(1);
|
|
78
|
+
expect(rs.rows.item(0).hex_value).toBe('010203');
|
|
79
|
+
|
|
80
|
+
// Close (plugin only) & finish:
|
|
81
|
+
(isWebSql) ? done() : db.close(done, done);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}, MYTIMEOUT);
|
|
85
|
+
|
|
86
|
+
it(suiteName + "SELECT HEX of BLOBFROMBASE64 with 'AQID AQIE AQIF' [X'010203010204010205' - spaces ignored] parameter", function(done) {
|
|
87
|
+
if (isWebSql) pending('SKIP: BLOBFROMBASE64 not supported by Web SQL');
|
|
88
|
+
if (!isWebSql && isAndroid && isImpl2) pending("SKIP: BLOBFROMBASE64 not supported with androidDatabaseProvider: 'system'");
|
|
89
|
+
|
|
90
|
+
var db = openDatabase('SELECT-HEX-of-BLOBFROMBASE64-AQID-AS-HEX-VALUE.db');
|
|
91
|
+
|
|
92
|
+
db.transaction(function(tx) {
|
|
93
|
+
tx.executeSql("SELECT HEX(BLOBFROMBASE64(?)) AS hex_value", ['AQID AQIE AQIF'], function(ignored, rs) {
|
|
94
|
+
expect(rs).toBeDefined();
|
|
95
|
+
expect(rs.rows).toBeDefined();
|
|
96
|
+
expect(rs.rows.length).toBe(1);
|
|
97
|
+
expect(rs.rows.item(0).hex_value).toBe('010203010204010205');
|
|
98
|
+
|
|
99
|
+
// Close (plugin only) & finish:
|
|
100
|
+
(isWebSql) ? done() : db.close(done, done);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}, MYTIMEOUT);
|
|
104
|
+
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
describe(suiteName + 'INSERT BLOB data from BLOBFROMBASE64 & check stored data', function() {
|
|
108
|
+
|
|
109
|
+
it(suiteName + "INSERT BLOBFROMBASE64 from 'AQID AQIE AQIF' [X'010203010204010205' - spaces ignored], SELECT as BASE64, and check type", function(done) {
|
|
110
|
+
if (isWebSql) pending('SKIP: BLOBFROMBASE64 not supported by Web SQL');
|
|
111
|
+
if (!isWebSql && isAndroid && isImpl2) pending("SKIP: BLOBFROMBASE64 not supported with androidDatabaseProvider: 'system'");
|
|
112
|
+
|
|
113
|
+
var db = openDatabase('INSERT-BLOBFROMBASE64-AQID-AQIE-AQIF-and-check.db');
|
|
114
|
+
|
|
115
|
+
db.transaction(function(tx) {
|
|
116
|
+
tx.executeSql('DROP TABLE IF EXISTS tt');
|
|
117
|
+
tx.executeSql('CREATE TABLE tt (data)');
|
|
118
|
+
tx.executeSql("INSERT INTO tt VALUES(BLOBFROMBASE64(?))", ["AQID AQIE AQIF"]);
|
|
119
|
+
}, function(error) {
|
|
120
|
+
// NOT EXPECTED:
|
|
121
|
+
expect(false).toBe(true);
|
|
122
|
+
expect(error.message).toBe('--');
|
|
123
|
+
done();
|
|
124
|
+
}, function() {
|
|
125
|
+
db.transaction(function(tx2) {
|
|
126
|
+
tx2.executeSql("SELECT HEX(data) AS hex_value from tt", [], function(ignored, rs) {
|
|
127
|
+
expect(rs).toBeDefined();
|
|
128
|
+
expect(rs.rows).toBeDefined();
|
|
129
|
+
expect(rs.rows.length).toBe(1);
|
|
130
|
+
expect(rs.rows.item(0).hex_value).toBe('010203010204010205');
|
|
131
|
+
|
|
132
|
+
tx2.executeSql("SELECT TYPEOF(data) AS value_type from tt", [], function(ignored, rs2) {
|
|
133
|
+
expect(rs2).toBeDefined();
|
|
134
|
+
expect(rs2.rows).toBeDefined();
|
|
135
|
+
expect(rs2.rows.length).toBe(1);
|
|
136
|
+
expect(rs2.rows.item(0).value_type).toBe('blob');
|
|
137
|
+
|
|
138
|
+
// Close (plugin only) & finish:
|
|
139
|
+
(isWebSql) ? done() : db.close(done, done);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}, MYTIMEOUT);
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (window.hasBrowser) mytests();
|
|
157
|
+
else exports.defineAutoTests = mytests;
|
|
158
|
+
|
|
159
|
+
/* vim: set expandtab : */
|
|
@@ -358,7 +358,9 @@ var mytests = function() {
|
|
|
358
358
|
}, MYTIMEOUT);
|
|
359
359
|
|
|
360
360
|
it(suiteName + 'Open database with emoji \uD83D\uDE03 (UTF-8 4 bytes) & check internal database file name', function(done) {
|
|
361
|
-
|
|
361
|
+
// TODO needs testing on multiple Android emulators and devices ref:
|
|
362
|
+
// https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free/issues/26
|
|
363
|
+
if (isAndroid && !isImpl2) pending('TBD SKIP FOR NOW on default Android (evcore NDK) database access implementation, pending further testing');
|
|
362
364
|
|
|
363
365
|
var dbName = 'a\uD83D\uDE03.db';
|
|
364
366
|
|
|
@@ -1472,7 +1472,7 @@ var mytests = function() {
|
|
|
1472
1472
|
});
|
|
1473
1473
|
}, MYTIMEOUT);
|
|
1474
1474
|
|
|
1475
|
-
//
|
|
1475
|
+
// ENCODING ISSUE NOW FIXED with emojis and other 4-byte UTF-8 characters
|
|
1476
1476
|
// on default Android [evplus] NDK implementation
|
|
1477
1477
|
// ref:
|
|
1478
1478
|
// - litehelpers/Cordova-sqlite-evcore-extbuild-free#44
|
|
@@ -1542,15 +1542,13 @@ var mytests = function() {
|
|
|
1542
1542
|
expect(rs1).toBeDefined();
|
|
1543
1543
|
expect(rs1.rows).toBeDefined();
|
|
1544
1544
|
expect(rs1.rows.length).toBe(1);
|
|
1545
|
-
|
|
1546
|
-
expect(rs1.rows.item(0).myresult).toBe('A𐌱');
|
|
1545
|
+
expect(rs1.rows.item(0).myresult).toBe('A𐌱');
|
|
1547
1546
|
|
|
1548
1547
|
tx.executeSql("SELECT UPPER('a𐌱') AS myresult", null, function(ignored, rs2) {
|
|
1549
1548
|
expect(rs2).toBeDefined();
|
|
1550
1549
|
expect(rs2.rows).toBeDefined();
|
|
1551
1550
|
expect(rs2.rows.length).toBe(1);
|
|
1552
|
-
|
|
1553
|
-
expect(rs2.rows.item(0).myresult).toBe('A𐌱');
|
|
1551
|
+
expect(rs2.rows.item(0).myresult).toBe('A𐌱');
|
|
1554
1552
|
|
|
1555
1553
|
// Close (plugin only) & finish:
|
|
1556
1554
|
(isWebSql) ? done() : db.close(done, done);
|
|
@@ -1566,6 +1564,8 @@ var mytests = function() {
|
|
|
1566
1564
|
}, MYTIMEOUT);
|
|
1567
1565
|
|
|
1568
1566
|
it(suiteName + "SELECT LOWER(X'41F0908CB1') - RETURNS '\\uF041\\u8C90' ('\uF041\u8C90') UTF-16le on Android 4.1-4.3 (WebKit) Web SQL & Windows, UTF-8 'a\\uD800\\uDF31' ('a\uD800\uDF31') otherwise - ENCODING ISSUE NOW FIXED on default Android SQLite3 NDK [evplus] implementation", function(done) {
|
|
1567
|
+
// ENCODING ISSUE NOW FIXED with emojis and other 4-byte UTF-8 characters
|
|
1568
|
+
// on default Android evcore NDK implementation
|
|
1569
1569
|
// ref:
|
|
1570
1570
|
// - litehelpers/Cordova-sqlite-evcore-extbuild-free#44
|
|
1571
1571
|
// - litehelpers/Cordova-sqlite-storage#564
|
|
@@ -1646,8 +1646,7 @@ var mytests = function() {
|
|
|
1646
1646
|
expect(rs).toBeDefined();
|
|
1647
1647
|
expect(rs.rows).toBeDefined();
|
|
1648
1648
|
expect(rs.rows.length).toBe(1);
|
|
1649
|
-
|
|
1650
|
-
expect(rs.rows.item(0).uppertext).toBe('A\uD83D\uDE03.');
|
|
1649
|
+
expect(rs.rows.item(0).uppertext).toBe('A\uD83D\uDE03.');
|
|
1651
1650
|
|
|
1652
1651
|
// Close (plugin only) & finish:
|
|
1653
1652
|
(isWebSql) ? done() : db.close(done, done);
|
|
@@ -1677,8 +1676,7 @@ var mytests = function() {
|
|
|
1677
1676
|
expect(rs.rows).toBeDefined();
|
|
1678
1677
|
expect(rs.rows.length).toBe(1);
|
|
1679
1678
|
|
|
1680
|
-
|
|
1681
|
-
expect(rs.rows.item(0).uppertext).toBe('A\uD83D\uDE03.');
|
|
1679
|
+
expect(rs.rows.item(0).uppertext).toBe('A\uD83D\uDE03.');
|
|
1682
1680
|
|
|
1683
1681
|
// Close (plugin only) & finish:
|
|
1684
1682
|
(isWebSql) ? done() : db.close(done, done);
|
|
@@ -1693,8 +1691,8 @@ var mytests = function() {
|
|
|
1693
1691
|
}, MYTIMEOUT);
|
|
1694
1692
|
|
|
1695
1693
|
it(suiteName + 'emoji HEX test: SELECT HEX("@\\uD83D\\uDE03!") [\\u1F603 SMILING FACE (MOUTH OPEN)] [ENCODING ISSUE NOW FIXED on Android post-5.x [evplus]; default sqlite HEX encoding: UTF-6le on Windows & Android 4.1-4.3 (WebKit) Web SQL, UTF-8 otherwise]', function(done) {
|
|
1696
|
-
// ENCODING ISSUE
|
|
1697
|
-
//
|
|
1694
|
+
// ENCODING ISSUE NOW FIXED with emojis and other 4-byte UTF-8 characters
|
|
1695
|
+
// on default Android evcore NDK implementation
|
|
1698
1696
|
// ref:
|
|
1699
1697
|
// - litehelpers/Cordova-sqlite-evcore-extbuild-free#44
|
|
1700
1698
|
// - litehelpers/Cordova-sqlite-storage#564
|
|
@@ -2160,8 +2158,7 @@ var mytests = function() {
|
|
|
2160
2158
|
var resultRow1 = rs1.rows.item(0);
|
|
2161
2159
|
expect(resultRow1).toBeDefined();
|
|
2162
2160
|
expect(resultRow1.upperText).toBeDefined();
|
|
2163
|
-
|
|
2164
|
-
expect(resultRow1.upperText).toBe(
|
|
2161
|
+
expect(resultRow1.upperText).toBe(
|
|
2165
2162
|
'A\uD83D\uDE01\uD83D\uDE02\uD83D\uDE03\uD83D\uDE04\uD83D\uDE05' +
|
|
2166
2163
|
'A\uD83D\uDE01\uD83D\uDE02\uD83D\uDE03\uD83D\uDE04\uD83D\uDE05' +
|
|
2167
2164
|
'A\uD83D\uDE01\uD83D\uDE02\uD83D\uDE03\uD83D\uDE04\uD83D\uDE05' +
|
|
@@ -531,8 +531,8 @@ var mytests = function() {
|
|
|
531
531
|
});
|
|
532
532
|
}, MYTIMEOUT);
|
|
533
533
|
|
|
534
|
-
//
|
|
535
|
-
// on
|
|
534
|
+
// ENCODING ISSUE NOW FIXED with emojis and other 4-byte UTF-8 characters
|
|
535
|
+
// on default Android evcore NDK implementation
|
|
536
536
|
// ref:
|
|
537
537
|
// - litehelpers/Cordova-sqlite-evcore-extbuild-free#44
|
|
538
538
|
// - litehelpers/Cordova-sqlite-storage#564
|
|
@@ -556,9 +556,9 @@ var mytests = function() {
|
|
|
556
556
|
var row = rs2.rows.item(0);
|
|
557
557
|
// [evplus] NOW FIXED (...)
|
|
558
558
|
// Full object check:
|
|
559
|
-
|
|
559
|
+
expect(row).toEqual({data: '@\uD83D\uDE03!'});
|
|
560
560
|
// Check individual members:
|
|
561
|
-
|
|
561
|
+
expect(row.data).toBe('@\uD83D\uDE03!');
|
|
562
562
|
|
|
563
563
|
tx.executeSql('SELECT HEX(data) AS hexvalue FROM test_table', [], function(tx_ignored, rs3) {
|
|
564
564
|
expect(rs3).toBeDefined();
|
|
@@ -591,7 +591,7 @@ var mytests = function() {
|
|
|
591
591
|
// ref:
|
|
592
592
|
// - litehelpers/Cordova-sqlite-evcore-extbuild-free#43
|
|
593
593
|
// - litehelpers/Cordova-sqlite-storage#564
|
|
594
|
-
it(suiteName + 'INSERT TEXT string with 25 emojis, SELECT the data, and check
|
|
594
|
+
it(suiteName + 'INSERT TEXT string with 25 emojis, SELECT the data, and check' , function(done) {
|
|
595
595
|
// ref:
|
|
596
596
|
// - litehelpers/Cordova-sqlite-evcore-extbuild-free#44
|
|
597
597
|
// - litehelpers/Cordova-sqlite-storage#564
|
|
@@ -614,8 +614,7 @@ var mytests = function() {
|
|
|
614
614
|
expect(rs2.rows.length).toBe(1);
|
|
615
615
|
|
|
616
616
|
var row = rs2.rows.item(0);
|
|
617
|
-
|
|
618
|
-
expect(row.data).toBe(part + part + part + part + part);
|
|
617
|
+
expect(row.data).toBe(part + part + part + part + part);
|
|
619
618
|
|
|
620
619
|
// Close (plugin only) & finish:
|
|
621
620
|
(isWebSql) ? done() : db.close(done, done);
|