Skip to content

Commit 8232262

Browse files
author
Christopher J. Brody
committed
Windows error test & doc fixes (existing behavior)
ref: - #539 - #821
1 parent 59f9d31 commit 8232262

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ See the [Sample section](#sample) for a sample with a more detailed explanation
236236
- 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.
237237
- Truncation issue with UNICODE `\u0000` character (same as `\0`)
238238
- No background processing
239-
- 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)
239+
- INCONSISTENT error code (0) and INCORRECT error message (missing actual error info) in error callbacks ref: [litehelpers/Cordova-sqlite-storage#539](https://github.com/litehelpers/Cordova-sqlite-storage/issues/539)
240240
- 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 [litehelpers / cordova-sqlite-ext](https://github.com/litehelpers/cordova-sqlite-ext) (permissive license terms) and [litehelpers / Cordova-sqlite-evcore-extbuild-free](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free) (GPL or commercial license terms).
241241
- 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: [litehelpers/Cordova-sqlite-storage#652](https://github.com/litehelpers/Cordova-sqlite-storage/issues/652))
242242
- Known issue with database names that contain certain US-ASCII punctuation and control characters (see below)
@@ -538,7 +538,7 @@ As "strongly recommended" by [Web SQL Database API 8.5 SQL injection](https://ww
538538
- Known issue(s) with of certain ASCII/UNICODE characters as described below.
539539
- 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)
540540
- A number of uncategorized errors such as CREATE VIRTUAL TABLE USING bogus module are reported with error code 5 (SQLError.SYNTAX_ERR) on Android/iOS/macOS by both (WebKit) Web SQL and this plugin.
541-
- Issues with error code on Windows as well as Android with the `androidDatabaseImplementation: 2` setting described below.
541+
- Error is reported with error code of `0` on Windows as well as Android with the `androidDatabaseImplementation: 2` setting.
542542
- 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.
543543
- This plugin supports some non-standard features as documented below.
544544
- 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.)
@@ -579,7 +579,7 @@ See **Security of sensitive data** in the [Security](#security) section above.
579579
- 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) (GPL or commercial license terms)
580580
- 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: [litehelpers/Cordova-sqlite-storage#405](https://github.com/litehelpers/Cordova-sqlite-storage/issues/405)
581581
- 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 [litehelpers/Cordova-sqlite-storage#196](https://github.com/litehelpers/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).
582-
- SQL errors are reported with an INCORRECT error code (0) on Windows ref: [litehelpers/Cordova-sqlite-storage#539](https://github.com/litehelpers/Cordova-sqlite-storage/issues/539). In certain cases SQL errors are also reported with error code 0 on Android in case the built-in Android database is used (using the `androidDatabaseImplementation: 2` setting in `window.sqlitePlugin.openDatabase`).
582+
- SQL errors are reported with incorrect & inconsistent error message on Windows - missing actual error info ref: [litehelpers/Cordova-sqlite-storage#539](https://github.com/litehelpers/Cordova-sqlite-storage/issues/539).
583583
- Close/delete database bugs described below.
584584
- When a database is opened and deleted without closing, the iOS/macOS platform version is known to leak resources.
585585
- It is NOT possible to open multiple databases with the same name but in different locations (iOS/macOS platform version).

spec/www/spec/db-tx-error-mapping-test.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ var mytests = function() {
3535
// TBD skip plugin test on browser platform (not yet supported):
3636
if (isBrowser && (i === 0)) continue;
3737

38-
describe(scenarioList[i] + ': db tx error mapping test(s)' +
39-
(isWindows ?
40-
' [Windows version with INCORRECT error code (0) & INCONSISTENT error message (missing actual error info)]' :
41-
''), function() {
38+
describe(scenarioList[i] + ': db tx error mapping test(s) [TBD INCORRECT & INCONSISTENT error message on Windows - missing actual error info ref: litehelpers/Cordova-sqlite-storage#539]', function() {
4239
var scenarioName = scenarioList[i];
4340
var suiteName = scenarioName + ': ';
4441
var isWebSql = (i === 1);

0 commit comments

Comments
 (0)