Skip to content

Commit fa6f46a

Browse files
author
Christopher J. Brody
committed
2 parents 44573fb + 232b004 commit fa6f46a

File tree

7 files changed

+33
-23
lines changed

7 files changed

+33
-23
lines changed

CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changes
22

3+
## cordova-sqlite-evplus-ext-free 0.0.5
4+
5+
### cordova-sqlite-evcore-legacy-ext-common-free 0.0.5
6+
7+
- Use cordova-sqlite-evcore-free-dependencies 0.8.2 with SQLite 3.22.0, with SQLITE_DEFAULT_SYNCHRONOUS=3 (EXTRA DURABLE ref: litehelpers/Cordova-sqlite-storage#736) & other build fixes
8+
39
## cordova-sqlite-evplus-ext-free 0.0.4
410

511
### cordova-sqlite-evcore-legacy-ext-common-free 0.0.4

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Native interface to sqlite in a Cordova/PhoneGap plugin for Android, iOS, macOS,
44

55
This plugin version uses a special Android NDK sqlite database access library (C-language implementation) to provide significant performance and memory usage improvements on the Android platform.
66

7-
This plugin version is available under GPL v3 (http://www.gnu.org/licenses/gpl.txt) or commercial license options and includes components available under the MIT and Apache 2.0 licenses listed in [LICENSE.md](./LICENSE.md). Contact for commercial license: <[email protected]>
7+
This plugin version is available under GPL v3 (<https://www.gnu.org/licenses/gpl-3.0.txt>) or commercial license options and includes components available under the MIT and Apache 2.0 licenses listed in [LICENSE.md](./LICENSE.md). Contact for commercial license: <[email protected]>
88

99
**NOTICE:** Commercial licenses for _Cordova-sqlite-evcore and_ [litehelpers / Cordova-sqlite-enterprise-free](https://github.com/litehelpers/Cordova-sqlite-enterprise-free) are **NOT** valid for this version. For an upgrade please contact <[email protected]>.
1010

@@ -22,7 +22,7 @@ TBD NOTE: This version branch has external sqlite3 dependencies that are install
2222

2323
## WARNING: Multiple SQLite problem on Android
2424

25-
This plugin uses a non-standard [litehelpers / Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) sqlite database access implementation on Android. In case an application access the SAME database using multiple plugins there is a risk of data corruption (ref: [litehelpers/Cordova-sqlite-storage#626](https://github.com/litehelpers/Cordova-sqlite-storage/issues/626)) as described in <http://ericsink.com/entries/multiple_sqlite_problem.html> and <https://www.sqlite.org/howtocorrupt.html>.
25+
This plugin uses non-standard [litehelpers / Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) sqlite database access implementation on Android. In case an application access the SAME database using multiple plugins there is a risk of data corruption (ref: [litehelpers/Cordova-sqlite-storage#626](https://github.com/litehelpers/Cordova-sqlite-storage/issues/626)) as described in <http://ericsink.com/entries/multiple_sqlite_problem.html> and <https://www.sqlite.org/howtocorrupt.html>.
2626

2727
The workaround is to use the `androidDatabaseImplementation: 2` setting as described in the **Android sqlite implementation** section below:
2828

@@ -132,16 +132,17 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
132132
- BASE64 integrated from [brodybits / sqlite3-base64](https://github.com/brodybits/sqlite3-base64), using [brodybits / libb64-encode](https://github.com/brodybits/libb64-encode) (based on <http://libb64.sourceforge.net/> by Chris Venter, public domain)
133133
- REGEXP for Android _(default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access 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)
134134
- The iOS database location is now mandatory, as documented below.
135-
- SQLite version `3.15.2` included with the following compile-time options:
136-
- `SQLITE_THREADSAFE=1` on iOS/macOS/Windows (`SQLITE_THREADSAFE=2` Android)
135+
- SQLite version `3.22.0` included with the following compile-time options:
136+
- `SQLITE_THREADSAFE=1`
137+
- `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE build setting) ref: [litehelpers/Cordova-sqlite-storage#736](https://github.com/litehelpers/Cordova-sqlite-storage/issues/736)
137138
- `SQLITE_LOCKING_STYLE=1` on iOS/macOS ONLY
138139
- `HAVE_USLEEP=1` (iOS/macOS/Windows)
140+
- `SQLITE_DEFAULT_MEMSTATUS=0`
141+
- `SQLITE_OMIT_DECLTYPE`
142+
- `SQLITE_OMIT_DEPRECATED`
143+
- `SQLITE_OMIT_SHARED_CACHE`
144+
- `SQLITE_OMIT_LOAD_EXTENSION`
139145
- `SQLITE_TEMP_STORE=2`
140-
- `SQLITE_DEFAULT_MEMSTATUS=0` (iOS/macOS/Windows)
141-
- `SQLITE_OMIT_DECLTYPE` (iOS/macOS/Windows)
142-
- `SQLITE_OMIT_DEPRECATED` (iOS/macOS/Windows)
143-
- `SQLITE_OMIT_SHARED_CACHE` (iOS/macOS/Windows)
144-
- `SQLITE_OMIT_LOAD_EXTENSION` (iOS/macOS/Windows)
145146
- `SQLITE_ENABLE_FTS3`
146147
- `SQLITE_ENABLE_FTS3_PARENTHESIS`
147148
- `SQLITE_ENABLE_FTS4`
@@ -177,6 +178,7 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
177178

178179
## Announcements
179180

181+
- 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)
180182
- Nice overview of alternatives for storing local data in Cordova apps at: <https://www.sitepoint.com/storing-local-data-in-a-cordova-app/>
181183
- 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
182184
- 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).
@@ -185,7 +187,7 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
185187
- Fixed iOS/macOS platform version to use [PSPDFThreadSafeMutableDictionary.m](https://gist.github.com/steipete/5928916) to avoid threading issue ref: [litehelpers/Cordova-sqlite-storage#716](https://github.com/litehelpers/Cordova-sqlite-storage/issues/716)
186188
- [brodybits / cordova-sqlite-test-app](https://github.com/brodybits/cordova-sqlite-test-app) project is a CC0 (public domain) starting point (NOTE that this plugin must be added) and may also be used to reproduce issues with this plugin.
187189
- The Lawnchair adapter is now moved to [litehelpers / cordova-sqlite-lawnchair-adapter](https://github.com/litehelpers/cordova-sqlite-lawnchair-adapter).
188-
- [litehelpers / cordova-sqlite-ext](https://github.com/litehelpers/cordova-sqlite-ext) now supports SELECT BLOB data in Base64 format on all platforms in addition to REGEXP (Android/iOS/macOS) and pre-populated database (all platforms).
190+
- This plugin version now supports SELECT BLOB data in Base64 format on all platforms in addition to REGEXP (Android/iOS/macOS) ~~and pre-populated database (all platforms - FUTURE TODO)~~.
189191
- [brodybits / sql-promise-helper](https://github.com/brodybits/sql-promise-helper) provides a Promise-based API wrapper.
190192
- [nolanlawson / pouchdb-adapter-cordova-sqlite](https://github.com/nolanlawson/pouchdb-adapter-cordova-sqlite) supports this plugin along with other implementations such as [nolanlawson / sqlite-plugin-2](https://github.com/nolanlawson/sqlite-plugin-2) and [Microsoft / cordova-plugin-websql](https://github.com/Microsoft/cordova-plugin-websql).
191193
- macOS ("osx" platform) is now supported
@@ -350,7 +352,7 @@ In case you get stuck with something please read through the [support](#support)
350352

351353
### Plugin usage examples
352354

353-
- [brodybits / cordova-sqlite-storage-starter-app](https://github.com/brodybits/cordova-sqlite-storage-starter-app) (uses `cordova-sqlite-storage` plugin version)
355+
- [brodybits / cordova-sqlite-storage-starter-app](https://github.com/brodybits/cordova-sqlite-storage-starter-app) (using `cordova-sqlite-storage` plugin version)
354356
- <http://stackoverflow.com/questions/26604952/a-simple-cordova-android-example-including-sqlite-read-write-and-search>
355357

356358
### Plugin tutorials

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-sqlite-evplus-ext-free",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Cordova/PhoneGap sqlite storage - free enterprise version with performance improvements for Android (common version branch with external sqlite3 dependencies)",
55
"cordova": {
66
"id": "cordova-sqlite-evplus-ext-free",
@@ -24,13 +24,13 @@
2424
"cordova-windows"
2525
],
2626
"author": "various",
27-
"license": "GPL",
27+
"license": "GPL-3.0 OR Commercial",
2828
"bugs": {
2929
"url": "https://github.com/litehelpers/cordova-plugin-sqlite-evplus-ext-free/issues"
3030
},
3131
"homepage": "https://github.com/litehelpers/cordova-plugin-sqlite-evplus-ext-free",
3232
"dependencies": {
33-
"cordova-sqlite-evcore-free-dependencies": "0.8.1"
33+
"cordova-sqlite-evcore-free-dependencies": "0.8.2"
3434
},
3535
"scripts": {
3636
"start": "node scripts/prepareSpec.js"

plugin.xml

+3-3
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-evplus-ext-free"
5-
version="0.0.4">
5+
version="0.0.5">
66

77
<name>Cordova sqlite storage - free enterprise version with performance improvements for Android (legacy common version branch with external sqlite3 dependencies)</name>
88

@@ -68,7 +68,7 @@
6868

6969
<header-file src="node_modules/cordova-sqlite-evcore-free-dependencies/sqlite3.h" />
7070
<source-file src="node_modules/cordova-sqlite-evcore-free-dependencies/sqlite3.c"
71-
compiler-flags="-w -DSQLITE_THREADSAFE=1 -DSQLITE_LOCKING_STYLE=1 -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_TEMP_STORE=2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=-2000" />
71+
compiler-flags="-w -DSQLITE_THREADSAFE=1 -DSQLITE_DEFAULT_SYNCHRONOUS=3 -DSQLITE_LOCKING_STYLE=1 -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_TEMP_STORE=2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=-2000" />
7272
</platform>
7373

7474
<!-- macOS (osx) -->
@@ -100,7 +100,7 @@
100100

101101
<header-file src="node_modules/cordova-sqlite-evcore-free-dependencies/sqlite3.h" />
102102
<source-file src="node_modules/cordova-sqlite-evcore-free-dependencies/sqlite3.c"
103-
compiler-flags="-w -DSQLITE_THREADSAFE=1 -DSQLITE_LOCKING_STYLE=1 -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_TEMP_STORE=2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=-2000" />
103+
compiler-flags="-w -DSQLITE_THREADSAFE=1 -DSQLITE_DEFAULT_SYNCHRONOUS=3 -DSQLITE_LOCKING_STYLE=1 -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_TEMP_STORE=2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=-2000" />
104104
</platform>
105105

106106
<!-- windows -->

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ var mytests = function() {
151151
});
152152
}, MYTIMEOUT);
153153

154-
it(suiteName + 'INSERT syntax error [VALUES in the wrong place] with a trailing space', function(done) {
154+
it(suiteName + 'INSERT syntax error [VALUES in the wrong place (XXX "incomplete input")] with a trailing space [XXX TBD PROPER INFO MESSAGE NOT ON Android/...]', function(done) {
155155
if (isWP8) pending('SKIP for WP(8)'); // FUTURE TBD
156156

157157
var db = openDatabase("INSERT-Syntax-error-test.db", "1.0", "Demo", DEFAULT_SIZE);
@@ -184,12 +184,12 @@ var mytests = function() {
184184
expect(error.message).toMatch(/could not prepare statement.*1 near \"VALUES\": syntax error/);
185185
else if (isWindows)
186186
expect(error.message).toMatch(/Error preparing an SQLite statement/);
187-
else if (isAndroid && !isImpl2)
187+
else if (isAndroid && !isImpl2) //* XXX TBD PROPER INFO MESSAGE NOT ON Android/...
188188
expect(error.message).toMatch(/syntax error or other error.*code 1/);
189189
else if (isAndroid && isImpl2)
190190
expect(error.message).toMatch(/near \"VALUES\": syntax error.*code 1.*while compiling: INSERT INTO test_table/);
191191
else
192-
expect(error.message).toMatch(/near \" \": syntax error/);
192+
expect(error.message).toMatch(/incomplete input/); // XXX SQLite 3.22.0 on iOS/macOS
193193

194194
// FAIL transaction & check reported transaction error:
195195
return true;
@@ -209,8 +209,10 @@ var mytests = function() {
209209
expect(error.message).toMatch(/callback raised an exception.*or.*error callback did not return false/);
210210
else if (isWindows)
211211
expect(error.message).toMatch(/error callback did not return false.*Error preparing an SQLite statement/);
212+
else if (!isWindows && isAndroid) // XXX TBD PROPER INFO MESSAGE NOT ON Android/...
213+
expect(error.message).toMatch(/error callback did not return false.*syntax error/); // XXX Android/...
212214
else
213-
expect(error.message).toMatch(/error callback did not return false.*syntax error/);
215+
expect(error.message).toMatch(/error callback did not return false.*incomplete input/); // XXX SQLite 3.22.0 on iOS/macOS
214216

215217
isWebSql ? done() : db.close(done, done);
216218
}, function() {

spec/www/spec/sqlite-version-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var mytests = function() {
6969
expect(rs.rows.item(0).myResult).toMatch(/3\.[0-9]+\.[0-9]+/);
7070
// Check specific [plugin only]:
7171
if (!isWebSql && !(!isWindows && isAndroid && isImpl2))
72-
expect(rs.rows.item(0).myResult).toBe('3.15.2');
72+
expect(rs.rows.item(0).myResult).toBe('3.22.0');
7373

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

src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<ItemDefinitionGroup>
1212
<ClCompile>
1313
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);$(MSBuildThisFileDirectory)..\..\..\..\node_modules\cordova-sqlite-evcore-free-dependencies;$(MSBuildThisFileDirectory)..\..\..\..\node_modules\cordova-sqlite-evcore-free-dependencies\sqlite3-base64;$(MSBuildThisFileDirectory)..\..\..\..\node_modules\cordova-sqlite-evcore-free-dependencies\libb64-encode</AdditionalIncludeDirectories>
14-
<AdditionalOptions>/DSQLITE_THREADSAFE=1 /DHAVE_USLEEP=1 /DSQLITE_DEFAULT_MEMSTATUS=0 /DSQLITE_OMIT_DECLTYPE /DSQLITE_OMIT_DEPRECATED /DSQLITE_OMIT_PROGRESS_CALLBACK /DSQLITE_OMIT_SHARED_CACHE /DSQLITE_TEMP_STORE=2 /DSQLITE_OMIT_LOAD_EXTENSION /DSQLITE_ENABLE_FTS3 /DSQLITE_ENABLE_FTS3_PARENTHESIS /DSQLITE_ENABLE_FTS4 /DSQLITE_ENABLE_FTS5 /DSQLITE_ENABLE_RTREE /DSQLITE_ENABLE_JSON1 /DSQLITE_DEFAULT_PAGE_SIZE=4096 /DSQLITE_DEFAULT_CACHE_SIZE=-2000 /DSQLITE_OS_WINRT %(AdditionalOptions)</AdditionalOptions>
14+
<AdditionalOptions>/DSQLITE_THREADSAFE=1 /DSQLITE_DEFAULT_SYNCHRONOUS=3 /DHAVE_USLEEP=1 /DSQLITE_DEFAULT_MEMSTATUS=0 /DSQLITE_OMIT_DECLTYPE /DSQLITE_OMIT_DEPRECATED /DSQLITE_OMIT_PROGRESS_CALLBACK /DSQLITE_OMIT_SHARED_CACHE /DSQLITE_TEMP_STORE=2 /DSQLITE_OMIT_LOAD_EXTENSION /DSQLITE_ENABLE_FTS3 /DSQLITE_ENABLE_FTS3_PARENTHESIS /DSQLITE_ENABLE_FTS4 /DSQLITE_ENABLE_FTS5 /DSQLITE_ENABLE_RTREE /DSQLITE_ENABLE_JSON1 /DSQLITE_DEFAULT_PAGE_SIZE=4096 /DSQLITE_DEFAULT_CACHE_SIZE=-2000 /DSQLITE_OS_WINRT %(AdditionalOptions)</AdditionalOptions>
1515
</ClCompile>
1616
</ItemDefinitionGroup>
1717
<ItemGroup>

0 commit comments

Comments
 (0)