Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 232b004

Browse files
author
Christopher J. Brody
committed
cordova-sqlite-evcore-legacy-ext-common-free 0.0.5
Using cordova-sqlite-evcore-free-dependencies 0.8.2 with SQLite 3.22.0, with SQLITE_DEFAULT_SYNCHRONOUS=3 (EXTRA DURABLE ref: storesafe/cordova-sqlite-storage#736) and other build fixes
1 parent bd98fe3 commit 232b004

File tree

7 files changed

+26
-18
lines changed

7 files changed

+26
-18
lines changed

CHANGES.md

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

3+
### cordova-sqlite-evcore-legacy-ext-common-free 0.0.5
4+
5+
- 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
6+
37
### cordova-sqlite-evcore-legacy-ext-common-free 0.0.4
48

59
- additional evcore iOS/macOS/Windows compile-time options

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,17 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
126126
- 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)
127127
- 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)
128128
- The iOS database location is now mandatory, as documented below.
129-
- SQLite version `3.15.2` included with the following compile-time options:
130-
- `SQLITE_THREADSAFE=1` on iOS/macOS/Windows (`SQLITE_THREADSAFE=2` Android)
129+
- SQLite version `3.22.0` included with the following compile-time options:
130+
- `SQLITE_THREADSAFE=1`
131+
- `SQLITE_DEFAULT_SYNCHRONOUS=3` (EXTRA DURABLE build setting) ref: [litehelpers/Cordova-sqlite-storage#736](https://github.com/litehelpers/Cordova-sqlite-storage/issues/736)
131132
- `SQLITE_LOCKING_STYLE=1` on iOS/macOS ONLY
132133
- `HAVE_USLEEP=1` (iOS/macOS/Windows)
134+
- `SQLITE_DEFAULT_MEMSTATUS=0`
135+
- `SQLITE_OMIT_DECLTYPE`
136+
- `SQLITE_OMIT_DEPRECATED`
137+
- `SQLITE_OMIT_SHARED_CACHE`
138+
- `SQLITE_OMIT_LOAD_EXTENSION`
133139
- `SQLITE_TEMP_STORE=2`
134-
- `SQLITE_DEFAULT_MEMSTATUS=0` (iOS/macOS/Windows)
135-
- `SQLITE_OMIT_DECLTYPE` (iOS/macOS/Windows)
136-
- `SQLITE_OMIT_DEPRECATED` (iOS/macOS/Windows)
137-
- `SQLITE_OMIT_SHARED_CACHE` (iOS/macOS/Windows)
138-
- `SQLITE_OMIT_LOAD_EXTENSION` (iOS/macOS/Windows)
139140
- `SQLITE_ENABLE_FTS3`
140141
- `SQLITE_ENABLE_FTS3_PARENTHESIS`
141142
- `SQLITE_ENABLE_FTS4`
@@ -171,6 +172,7 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
171172

172173
## Announcements
173174

175+
- 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)
174176
- Nice overview of alternatives for storing local data in Cordova apps at: <https://www.sitepoint.com/storing-local-data-in-a-cordova-app/>
175177
- 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
176178
- 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).

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-sqlite-evcore-legacy-ext-common-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 (legacy common version branch with external sqlite3 dependencies)",
55
"cordova": {
66
"id": "cordova-sqlite-evcore-legacy-ext-common-free",
@@ -30,7 +30,7 @@
3030
},
3131
"homepage": "https://github.com/litehelpers/cordova-sqlite-evcore-legacy-ext-common-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-evcore-legacy-ext-common-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)