Skip to content

Commit eafb53f

Browse files
author
Christopher J. Brody
committed
Test emoji & INLINE BLOB values; check too many parameters error
ISSUES documented: - emojis and other 4-octet UTF-8 characters on Android-sqlite-connector & Windows ref: storesafe#564 - INLINE BLOB values on Android-sqlite-connector & Windows - In case of too many parameters the plugin reports INCORRECT error code 0 (SQLError.UNKNOWN_ERR) while Android/iOS (WebKit) Web SQL reports correct error code
1 parent bd07f26 commit eafb53f

File tree

3 files changed

+369
-58
lines changed

3 files changed

+369
-58
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ License for Android and Windows versions: MIT or Apache 2.0
66

77
License for iOS version: MIT only
88

9-
|Android Circle-CI (**full** suite)|iOS Travis-CI (*very* limited suite)|
9+
|Android Circle-CI (**full** suite)|iOS Travis-CI (_partial_ suite)|
1010
|-----------------------|----------------------|
1111
|[![Circle CI](https://circleci.com/gh/litehelpers/Cordova-sqlite-storage.svg?style=svg)](https://circleci.com/gh/litehelpers/Cordova-sqlite-storage)|[![Build Status](https://travis-ci.org/litehelpers/Cordova-sqlite-storage.svg)](https://travis-ci.org/litehelpers/Cordova-sqlite-storage)|
1212

@@ -124,6 +124,8 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
124124
- Issue with UNICODE `\u0000` character (same as `\0`)
125125
- No background processing
126126
- INCORRECT error code (0) and INCONSISTENT error message (missing actual error info) in error callbacks ref: [litehelpers/Cordova-sqlite-storage#539](https://github.com/litehelpers/Cordova-sqlite-storage/issues/539)
127+
- Issue with emojis and other 4-octet UTF-8 characters (apparently not stored correctly)
128+
- Not possible to read BLOB column values
127129
- 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.
128130
- FTS3, FTS4, and R-Tree support is tested working OK in this version (for all target platforms in this version branch Android/iOS/Windows)
129131
- Android is supported back to SDK 10 (a.k.a. Gingerbread, Android 2.3.3); support for older versions is available upon request.
@@ -317,14 +319,15 @@ As "strongly recommended" by [Web SQL Database API 8.5 SQL injection](https://ww
317319
- This plugin does *not* support the synchronous Web SQL interfaces.
318320
- 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: [litehelpers/Cordova-sqlite-storage#551](https://github.com/litehelpers/Cordova-sqlite-storage/issues/551)
319321
- It is possible to insert multiple rows like: `transaction.executeSql('INSERT INTO MyTable VALUES (?,?),(?,?)', ['Alice', 101, 'Betty', 102]);` which was not supported by SQLite 3.6.19 as referenced by [Web SQL API section 5](https://www.w3.org/TR/webdatabase/#web-sql). The iOS WebKit Web SQL implementation seems to support this as well.
320-
- Unlike the HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/) this plugin handles executeSql calls with too few parameters without error reporting.
322+
- Unlike the HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/) this plugin handles executeSql calls with too few parameters without error reporting. In case of too many parameters this plugin reports error code 0 (SQLError.UNKNOWN_ERR) while Android/iOS (WebKit) Web SQL correctly reports error code 5 (SQLError.SYNTAX_ERR) ref: https://www.w3.org/TR/webdatabase/#dom-sqlexception-code-syntax
321323
- Known issue(s) with handling of `Infinity` values (positive or negative) and certain ASCII/UNICODE characters as described below.
322324
- Boolean `true` and `false` values are handled by converting them to the "true" and "false" TEXT string values, same as WebKit Web SQL on Android and iOS. This does not seem to be 100% correct as discussed in: [litehelpers/Cordova-sqlite-storage#545](https://github.com/litehelpers/Cordova-sqlite-storage/issues/545)
323325
- Certain errors such as CREATE VIRTUAL TABLE USING bogus module are reported with error code 5 (SQLError.SYNTAX_ERR) on Android and iOS. This happens to be the case for WebKit Web SQL (Android/iOS).
324326
- A number of uncategorized errors are reported with error code 5 (SQLError.SYNTAX_ERR) on Android and iOS by both WebKit Web SQL and this plugin.
325327
- Issues with error code on Windows as well as Android with the `androidDatabaseImplementation: 2` setting described below.
326328
- In case of an issue that causes an API function to throw an exception (Android/iOS WebKit) Web SQL includes includes a code member with value of 0 (SQLError.UNKNOWN_ERR) in the exception while the plugin includes no such code member.
327329
- This plugin supports some non-standard features as documented below.
330+
- Results of SELECT with BLOB data such as `SELECT LOWER(X'40414243') AS myresult`, `SELECT X'40414243' AS myresult`, or reading data stored by `INSERT INTO MyTable VALUES (X'40414243')` are not consistent on Android in case the built-in Android database is used (using the `androidDatabaseImplementation: 2` setting in `window.sqlitePlugin.openDatabase`) or Windows. (These work with Android/iOS WebKit Web SQL and have been supported by SQLite for a number of years.)
328331

329332
### Security of deleted data
330333

@@ -343,6 +346,7 @@ See **Security of sensitive data** in the [Security](#security) section above.
343346

344347
- iOS version does not support certain rapidly repeated open-and-close or open-and-delete test scenarios due to how the implementation handles background processing
345348
- As described below, auto-vacuum is NOT enabled by default.
349+
- The Android and Windows versions do not always handle four-byte UTF-8 characters emoji characters such as `\u1F603` (SMILING FACE, MOUTH OPEN) correctly ref: [litehelpers/Cordova-sqlite-storage#564](https://github.com/litehelpers/Cordova-sqlite-storage/issues/564). It is sometimes possible to store and retrieve such characters but certain operations hex conversions do not work properly with the default [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) database implementation. It is suspected that such characters would be stored incorrectly in the Android and Windows versions. This is not an issue in case the built-in Android database is used (using the `androidDatabaseImplementation: 2` setting in `window.sqlitePlugin.openDatabase`)
346350
- INSERT statement that affects multiple rows (due to SELECT cause or using TRIGGER(s), for example) does not report proper rowsAffected on Android in case the built-in Android database used (using the `androidDatabaseImplementation` option in `window.sqlitePlugin.openDatabase`)
347351
- Memory issue observed when adding a large number of records due to the JSON implementation which is improved in [litehelpers / Cordova-sqlite-evcore-extbuild-free](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free) (available with GPL or commercial license options)
348352
- Infinity (positive or negative) values are not supported (known to be broken on Android, may cause a crash on iOS ref: [litehelpers/Cordova-sqlite-storage#405](https://github.com/litehelpers/Cordova-sqlite-storage/issues/405))
@@ -402,7 +406,7 @@ Some more limitations are tracked in the [open Cordova-sqlite-storage documentat
402406
- Delete an open database inside a statement or transaction callback.
403407
- WITH clause (not supported by some older sqlite3 versions)
404408
- _Handling of invalid transaction and transaction.executeSql arguments_
405-
- _Emojis and other 4-octet UTF-8 characters_
409+
- More emojis and other 4-octet UTF-8 characters
406410

407411
<!-- END Further testing needed -->
408412

0 commit comments

Comments
 (0)