Skip to content

Commit

Permalink
cordova-sqlite-express-wip x.x.x BROKEN on Android
Browse files Browse the repository at this point in the history
selfTest BROKEN on Android (android.database implementation) due to
new BUG 666 workaround solution

SKIP other tests for now
  • Loading branch information
Christopher J. Brody committed Dec 10, 2017
1 parent ac8fcad commit 7269cba
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 48 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## cordova-sqlite-storage 2.1.3-xxx

XXX TBD

## cordova-sqlite-storage 2.1.2

##### cordova-sqlite-legacy-core 1.0.4
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Cordova/PhoneGap sqlite storage plugin
# Cordova/PhoneGap sqlite storage express WIP

Native interface to sqlite in a Cordova/PhoneGap plugin for Android, iOS, macOS, and Windows 10 (UWP), with API similar to HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/).
Native interface to sqlite in a Cordova/PhoneGap plugin for Android, iOS, macOS, ~~and Windows 10 (UWP)~~, with API similar to HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/).

License terms for Android and Windows platform versions: MIT or Apache 2.0

License terms for iOS/macOS platform version: MIT only

## About this version branch

This is the common version branch which supports the most widely used features and serves as the basis for the other versions.
EXPERIMENTAL "express" version with builtin sqlite3 libraries for Android/iOS/macOS, no Windows version support

This version branch uses a `before_plugin_install` hook to install sqlite3 library dependencies from `cordova-sqlite-storage-dependencies` via npm.
XXX BROKEN on Android: selfTest will not pass, NEEDS INVESTIGATION

XXX TODO:
- Doc needs update
- not tested on TBD
- update description in package.json & plugin.xml

<!-- XXX GONE:
|Android Circle-CI (**full** suite)|iOS Travis-CI (partial suite)|
|-----------------------|----------------------|
|[![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)|
-->

<!-- FUTURE TBD critial bug notices for this version branch -->

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "cordova-sqlite-storage",
"version": "2.1.2",
"name": "cordova-sqlite-express-wip",
"version": "2.1.3-pretest01",
"description": "Native interface to SQLite for PhoneGap/Cordova",
"cordova": {
"id": "cordova-sqlite-storage",
"id": "cordova-sqlite-express-wip",
"platforms": [
"android",
"ios",
Expand Down
45 changes: 5 additions & 40 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-sqlite-storage"
version="2.1.2">
id="cordova-sqlite-express-wip"
version="2.1.3-pretest01">

<name>Cordova sqlite storage plugin</name>

Expand All @@ -13,9 +13,6 @@
<description>Native interface to SQLite for PhoneGap/Cordova. Allows you to use more storage and provides more flexibility than the standard Web SQL database (window.openDatabase).</description>
<author>Litehelpers/Various</author>

<!-- THANKS to AllJoyn-Cordova / cordova-plugin-alljoyn: -->
<hook type="before_plugin_install" src="scripts/beforePluginInstall.js" />

<js-module src="www/SQLitePlugin.js" name="SQLitePlugin">
<clobbers target="SQLitePlugin" />
</js-module>
Expand All @@ -31,16 +28,7 @@

<source-file src="src/android/io/sqlc/SQLitePlugin.java" target-dir="src/io/sqlc"/>
<source-file src="src/android/io/sqlc/SQLiteAndroidDatabase.java" target-dir="src/io/sqlc"/>
<source-file src="src/android/io/sqlc/SQLiteConnectorDatabase.java" target-dir="src/io/sqlc"/>

<!-- Android-sqlite-connector [jar]: -->
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/sqlite-connector.jar" target-dir="libs"/>
<!-- Android-sqlite-connector native driver [native libs]: -->
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/arm64-v8a/libsqlc-native-driver.so" target-dir="libs/arm64-v8a"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/armeabi/libsqlc-native-driver.so" target-dir="libs/armeabi"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/armeabi-v7a/libsqlc-native-driver.so" target-dir="libs/armeabi-v7a"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/x86/libsqlc-native-driver.so" target-dir="libs/x86"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/x86_64/libsqlc-native-driver.so" target-dir="libs/x86_64"/>

</platform>

<!-- iOS -->
Expand All @@ -59,9 +47,7 @@
<source-file src="src/ios/PSPDFThreadSafeMutableDictionary.m"
compiler-flags="-w" />

<header-file src="node_modules/cordova-sqlite-storage-dependencies/sqlite3.h" />
<source-file src="node_modules/cordova-sqlite-storage-dependencies/sqlite3.c"
compiler-flags="-w -DSQLITE_THREADSAFE=2 -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_RTREE -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_CACHE_SIZE=2000" />
<framework src="libsqlite3.dylib" />
</platform>

<!-- macOS (osx) -->
Expand All @@ -80,28 +66,7 @@
<source-file src="src/ios/PSPDFThreadSafeMutableDictionary.m"
compiler-flags="-w" />

<header-file src="node_modules/cordova-sqlite-storage-dependencies/sqlite3.h" />
<source-file src="node_modules/cordova-sqlite-storage-dependencies/sqlite3.c"
compiler-flags="-w -DSQLITE_THREADSAFE=2 -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_RTREE -DSQLITE_DEFAULT_PAGE_SIZE=1024" />
</platform>

<!-- windows -->
<platform name="windows">
<js-module src="src/windows/sqlite-proxy.js" name="SQLiteProxy">
<runs />
</js-module>

<!-- SQLite3 JS module from SQLite3-WinRT/SQLite3JS: -->
<js-module src="src/windows/SQLite3-Win-RT/SQLite3JS/js/SQLite3.js" name="SQLite3">
<runs />
</js-module>

<!-- 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:
<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" />
-->
<framework src="libsqlite3.dylib" />
</platform>

</plugin>
Expand Down
2 changes: 2 additions & 0 deletions spec/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<!-- other spec file(s): -->
<script src="spec/self-test.js"></script>
<!-- SKIP OTHERS FOR NOW:
<script src="spec/sqlite-version-test.js"></script>
<script src="spec/db-tx-string-test.js"></script>
<script src="spec/db-tx-sql-select-value-test.js"></script>
Expand All @@ -37,6 +38,7 @@
<script src="spec/db-tx-error-mapping-test.js"></script>
<script src="spec/db-open-close-delete-test.js"></script>
<script src="spec/ext-tx-blob-test.js"></script>
-->

</head>

Expand Down
2 changes: 1 addition & 1 deletion src/android/io/sqlc/SQLitePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private SQLiteAndroidDatabase openDatabase(String dbname, CallbackContext cbc, b

Log.v("info", "Open sqlite db: " + dbfile.getAbsolutePath());

SQLiteAndroidDatabase mydb = old_impl ? new SQLiteAndroidDatabase() : new SQLiteConnectorDatabase();
SQLiteAndroidDatabase mydb = new SQLiteAndroidDatabase();
mydb.open(dbfile);

if (cbc != null) // XXX Android locking/closing BUG workaround
Expand Down

0 comments on commit 7269cba

Please sign in to comment.