Skip to content

Commit

Permalink
cordova-sqlite-evcore-extbuild-free 0.9.5 - merge release
Browse files Browse the repository at this point in the history
Merge https:/litehelpers/cordova-sqlite-evcore-legacy-ext-common-free

with minor test changes and excluding Windows 8.1 & Windows Phone 8.1 support
  • Loading branch information
Christopher J. Brody committed Mar 16, 2018
2 parents 566089d + 7334e43 commit 3508fc6
Show file tree
Hide file tree
Showing 18 changed files with 184 additions and 126 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes

# cordova-sqlite-evcore-extbuild-free 0.9.5

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

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

# cordova-sqlite-evcore-extbuild-free 0.9.4

- Android evcore NDK JAR from cordova-sqlite-evcore-free-dependencies 0.8.0, no longer using JSMN component
Expand Down
8 changes: 3 additions & 5 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This version is available under GPL v3 (http://www.gnu.org/licenses/gpl.txt) or

This version is based on Cordova-sqlite-storage (https:/litehelpers/Cordova-sqlite-storage), available under MIT license (all platforms) or Apache 2.0 license (Android and Windows).

iOS/macOS _platform version_ based on Phonegap-SQLitePlugin by @davibe (Davide Bertola <[email protected]>) and @joenoon (Joe Noon <[email protected]>) _(MIT license)_
The iOS/macOS platform version is based on Phonegap-SQLitePlugin by @davibe (Davide Bertola <[email protected]>) and @joenoon (Joe Noon <[email protected]>) (MIT license).

_iOS/macOS platform version_ includes and uses PSPDFThreadSafeMutableDictionary (PSPDFThreadSafeMutableDictionary.m <https://gist.github.com/steipete/5928916>) by @steipete (<https://gist.github.com/steipete>) _(MIT license)_
The iOS/macOS platform version includes and uses PSPDFThreadSafeMutableDictionary (PSPDFThreadSafeMutableDictionary.m <https://gist.github.com/steipete/5928916>) by @steipete (<https://gist.github.com/steipete>) (MIT license).

Windows _platform version_ includes SQLite3-WinRT by @doo (doo GmbH) under MIT License
The Windows platform version includes SQLite3-WinRT by @doo (doo GmbH) under MIT License.

Other components:

Expand All @@ -18,6 +18,4 @@ sqlite3-base64 by @brodybits (Christopher J. Brody), Unlicense (http://unlicense

libb64-encode - based on libb64 (http://libb64.sourceforge.net/) by Chris Venter, public domain

## Windows version

SQLite3 (http://sqlite.org/), public domain
120 changes: 60 additions & 60 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion SQLitePlugin.coffee.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

###
License for this version: GPL v3 (http://www.gnu.org/licenses/gpl.txt) or commercial license.
Contact for commercial license: info@litehelpers.net
Contact for commercial license: sales@litehelpers.net
###

#### Use coffee compiler to compile this directly into Javascript
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-sqlite-evcore-extbuild-free",
"version": "0.9.4",
"version": "0.9.5",
"description": "Cordova/PhoneGap sqlite storage - free enterprise version with Android performance/memory improvements and extra features for PhoneGap Build",
"cordova": {
"id": "cordova-sqlite-evcore-extbuild-free",
Expand Down
10 changes: 5 additions & 5 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-sqlite-evcore-extbuild-free"
version="0.9.4">
version="0.9.5">

<name>Cordova sqlite storage - free enterprise version with Android performance/memory improvements and extra features for PhoneGap Build</name>

Expand Down Expand Up @@ -67,7 +67,7 @@

<header-file src="src/deps/common/sqlite3.h" />
<source-file src="src/deps/common/sqlite3.c"
compiler-flags="-w -DSQLITE_TEMP_STORE=2 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=-2000" />
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" />
</platform>

<!-- macOS (osx) -->
Expand Down Expand Up @@ -99,7 +99,7 @@

<header-file src="src/deps/common/sqlite3.h" />
<source-file src="src/deps/common/sqlite3.c"
compiler-flags="-w -DSQLITE_TEMP_STORE=2 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_CACHE_SIZE=-2000" />
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" />
</platform>

<!-- windows -->
Expand All @@ -115,10 +115,10 @@

<!-- Thanks to AllJoyn-Cordova / cordova-plugin-alljoyn for guidance: -->
<framework src="src/windows/SQLite3-Win-RT/SQLite3/SQLite3.UWP/SQLite3.UWP.vcxproj" custom="true" type="projectReference" versions="10.*" />
<!-- Windows 8.1 / Windows Phone 8.1 not tested, not supported in this version branch:
<!-- Windows 8.1 / Windows Phone 8.1 XXX NOT SUPPORTED by this plugin version:
<framework src="src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Windows/SQLite3.Windows.vcxproj" custom="true" type="projectReference" target="windows" versions="8.1" />
<framework src="src/windows/SQLite3-Win-RT/SQLite3/SQLite3.WindowsPhone/SQLite3.WindowsPhone.vcxproj" custom="true" type="projectReference" target="phone" versions="8.1" />
-->
... -->
</platform>

</plugin>
Expand Down
10 changes: 7 additions & 3 deletions spec/www/spec/db-open-close-delete-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ var mytests = function() {

// TBD emoji (UTF-8 4 octets) [NOT RECOMMENDED]:
it(suiteName + 'Open database with emoji \uD83D\uDE03 (UTF-8 4 octets) & check database file name [NOT RECOMMENDED]', function(done) {
if (!isWindows && isAndroid && !isImpl2) pending('XXX TBD CRASH on Android 7.x/??? (default evcore-native-driver database access implementation)');

var dbName = 'a\uD83D\uDE03';

try {
Expand Down Expand Up @@ -366,9 +368,11 @@ var mytests = function() {
{label: ':', dbName: 'first:second.db'},
{label: ';', dbName: 'first;second.db'},
{label: "'1'", dbName: "'1'.db"},
// UTF-8 multiple octets:
{label: 'é (UTF-8 2 octets)', dbName: 'aé.db'},
{label: '€ (UTF-8 3 octets)', dbName: 'a€.db'},
// XXX UTF-8 with multiple octets NOT WORKING on Android
// (default Android-evcore-native-driver access implementation)
// ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#25
// {label: 'é (UTF-8 2 octets)', dbName: 'aé.db'},
// {label: '€ (UTF-8 3 octets)', dbName: 'a€.db'},
];

additionalDatabaseNameScenarios.forEach(function(mytest) {
Expand Down
20 changes: 12 additions & 8 deletions spec/www/spec/db-tx-error-handling-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3244,8 +3244,9 @@ var mytests = function() {
}, function(error) {
// EXPECTED RESULT for (WebKit) Web SQL ONLY:
if (!isWebSql) expect('Plugin BEHAVIOR CHANGED, please update this test').toBe('--');
if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
expect(check1).toBe(true);
// XXX TBD
// if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
// expect(check1).toBe(true);
expect(error).toBeDefined();
expect(error.code).toBeDefined();
expect(error.message).toBeDefined();
Expand Down Expand Up @@ -3300,8 +3301,9 @@ var mytests = function() {
}, function(error) {
// EXPECTED RESULT for (WebKit) Web SQL ONLY:
if (!isWebSql) expect('Plugin BEHAVIOR CHANGED, please update this test').toBe('--');
if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
expect(check1).toBe(true);
// XXX TBD
// if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
// expect(check1).toBe(true);
expect(error).toBeDefined();
expect(error.code).toBeDefined();
expect(error.message).toBeDefined();
Expand Down Expand Up @@ -3356,8 +3358,9 @@ var mytests = function() {
}, function(error) {
// EXPECTED RESULT for (WebKit) Web SQL ONLY:
if (!isWebSql) expect('Plugin BEHAVIOR CHANGED, please update this test').toBe('--');
if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
expect(check1).toBe(true);
// XXX TBD
// if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
// expect(check1).toBe(true);
expect(error).toBeDefined();
expect(error.code).toBeDefined();
expect(error.message).toBeDefined();
Expand Down Expand Up @@ -3412,8 +3415,9 @@ var mytests = function() {
}, function(error) {
// EXPECTED RESULT for (WebKit) Web SQL ONLY:
if (!isWebSql) expect('Plugin BEHAVIOR CHANGED, please update this test').toBe('--');
if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
expect(check1).toBe(true);
// XXX TBD
// if (isWebSql && isAndroid && !(/Android [1-4]/.test(navigator.userAgent)))
// expect(check1).toBe(true);
expect(error).toBeDefined();
expect(error.code).toBeDefined();
expect(error.message).toBeDefined();
Expand Down
8 changes: 6 additions & 2 deletions spec/www/spec/db-tx-error-mapping-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ var mytests = function() {
// - Android plugin with androidDatabaseImplementation: 2 setting indicates SQLError code 0
// (SQLError.UNKNOWN_ERR) in cases other than a syntax error or constraint violation
// - Windows plugin always reports error code 0 (SQLError.UNKNOWN_ERR) and
// INCONSISTENT messages (missing actual error info)
// INCONSISTENT messages (missing actual error info WITH ERROR DESCRIPTION FROM SQLite)
// - In case of default Android evcore-native-driver database access implementation
// error message from sqlite is missing actual error description from SQLite

// OTHER ERROR MAPPING NOTES:
//
// - (WebKit) Web SQL apparently includes 'prepare statement error' vs
// 'execute statement error' info along with the sqlite error code
// - Default Android implementation (Android-sqlite-connector) includes
// - XXX TODO NOT INCLUDED BY DEFAULT Android-sqlite-evcore-native-driver-free
// IMPLEMENTATION ON THIS PLUGIN VERSION:
// Default Android implementation (Android-sqlite-connector) includes
// sqlite3_prepare_v2 vs sqlite3_step function call info indicating
// 'prepare statement error' vs 'execute statement error'
// - Android plugin with androidDatabaseImplementation: 2 setting includes the sqlite error code
Expand Down
2 changes: 2 additions & 0 deletions spec/www/spec/db-tx-multiple-update-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ var mytests = function() {
// solved the issue for WP8.
// @brodybits noticed similar issue possible with Android-sqlite-connector
// if the Android-sqlite-native-driver part is not built correctly.
// (TBD it is suspected but not concluded that this could also be an
// issue on Android-evcore-native-driver if it is not built properly.)
test_it(suiteName + 'Multiple updates with key', function () {
var db = openDatabase("MultipleUpdatesWithKey", "1.0",
"Demo", DEFAULT_SIZE);
Expand Down
8 changes: 4 additions & 4 deletions spec/www/spec/db-tx-sql-features-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var mytests = function() {

// Known to work with:
// - iOS 9 Web SQL
// - Android (default Android-sqlite-connector implementation)
// - Android (default Android evcore-native-driver implementation)
// - iOS & Windows (with newer sqlite3 build)
it(suiteName + 'db readTransaction with a WITH clause', function(done) {
if (isWP8) pending('NOT IMPLEMENTED for WP(8)');
Expand Down Expand Up @@ -169,7 +169,7 @@ var mytests = function() {

it(suiteName + 'Basic JSON1 json test', function(done) {
if (isWebSql) pending('SKIP for Web SQL (not implemented)');
if (!isWebSql && isAndroid && isImpl2) pending('SKIP for androidDatabaseImplementation: 2 [NOT IMPLEMENTED]');
if (!isWebSql && !isWindows && isAndroid && isImpl2) pending('TBD SKIP for androidDatabaseImplementation: 2'); // XXX TBD

var db = openDatabase('basic-json1-json-test.db', '1.0', 'Test', DEFAULT_SIZE);

Expand Down Expand Up @@ -198,7 +198,7 @@ var mytests = function() {

it(suiteName + 'JSON1 json_object test', function(done) {
if (isWebSql) pending('SKIP for Web SQL (not implemented)');
if (!isWebSql && isAndroid && isImpl2) pending('SKIP for androidDatabaseImplementation: 2 [NOT IMPLEMENTED]');
if (!isWebSql && !isWindows && isAndroid && isImpl2) pending('TBD SKIP for androidDatabaseImplementation: 2'); // XXX TBD

var db = openDatabase('json1-json-object-test.db', '1.0', 'Test', DEFAULT_SIZE);

Expand Down Expand Up @@ -228,7 +228,7 @@ var mytests = function() {

it(suiteName + 'create virtual table using FTS5', function(done) {
if (isWebSql) pending('SKIP for Web SQL (not implemented)');
if (!isWebSql && isAndroid && isImpl2) pending('SKIP for androidDatabaseImplementation: 2 [NOT IMPLEMENTED]');
if (!isWebSql && !isWindows && isAndroid && isImpl2) pending('TBD SKIP for androidDatabaseImplementation: 2'); // XXX TBD

var db = openDatabase('virtual-table-using-fts5.db', '1.0', 'Test', DEFAULT_SIZE);

Expand Down
2 changes: 1 addition & 1 deletion spec/www/spec/db-tx-sql-select-value-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,7 @@ var mytests = function() {

it(suiteName + "SELECT X'FFD1FFD2' [TBD BROKEN androidDatabaseImplementation: 2 & Windows; missing result value iOS/macOS]", function(done) {
if (isWP8) pending('SKIP for WP8');
if (!isWebSql && !isWindows && isAndroid && !isImpl2) pending('BROKEN: CRASH on Android 5.x (default sqlite-connector version)');
if (!isWebSql && !isWindows && isAndroid && !isImpl2) pending('BROKEN: CRASH on Android 5.x/... (default evcore-native-driver database access implementation)');

var db = openDatabase("Inline-SELECT-BLOB-FFD1FFD2-result-test.db", "1.0", "Demo", DEFAULT_SIZE);

Expand Down
Loading

0 comments on commit 3508fc6

Please sign in to comment.