From 9df5ddba82045b0ea27cbdf44f04c3635564e794 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Mon, 2 May 2016 18:38:40 +0200 Subject: [PATCH] cordova-sqlite-storage 1.4.0-rc1 preparations - Fix cordova-sqlite-storage-dependencies reference - Minor doc fixes - Fix CHANGES.md history for new cordova-sqlite-storage version --- CHANGES.md | 68 ++++++++----------- README.md | 27 ++++---- package.json | 16 ++--- plugin.xml | 22 +++--- scripts/beforePluginInstall.js | 2 +- .../SQLite3/SQLite3.Shared.vcxitems | 6 +- 6 files changed, 64 insertions(+), 77 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4fc1d1a96..f4afd6d45 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,11 @@ # Changes -## 1.4.0-0x-common-dev +### cordova-sqlite-storage 1.4.0-rc1 -- Now using cordova-sqlite-common-dev-deps via git for SQLite 3.8.10.2 Android/iOS/Windows +- Now using cordova-sqlite-storage-dependencies for SQLite 3.8.10.2 Android/iOS/Windows +- Android-sqlite-connector implementation supported by this version again - Enforce minimum cordova-windows version (should be OK in Cordova 6.x) +- Support Windows 10 along with Windows 8.1/Windows Phone 8.1 ### cordova-sqlite-storage 1.2.2 @@ -16,11 +18,6 @@ - Specify minimum Cordova version 6.0.0 - Lawnchair adapter fix: Changed remove method to work with key array -## x.x.x-common-dev - -- Support Windows 8.1/Windows Phone 8.1 along with Windows 10 -- Fix PCH issue with Debug Win32 UWP (Windows 10) build - ### cordova-sqlite-storage 1.2.0 - Rename Lawnchair adapter to prevent clash with standard webkit-sqlite adapter @@ -37,32 +34,21 @@ - Workaround fix for empty readTransaction issue (litehelpers/Cordova-sqlite-storage#409) - Split spec/www/spec/legacy.js into db-open-close-delete-test.js & tx-extended.js -## 0.8.x-common-dev - -- Introduce Windows 10 UWP build (Windows 8.1 and Windows Phone 8.1 build disabled) - -## 0.8.0-common-dev - -- Separate SQLiteConnectorDatabase class for Android -- Renamed SQLiteProxy.js to sqlite-proxy.js in Windows version - ### cordova-sqlite-storage 0.8.0 - Simple sql batch transaction function - Echo test function -- Remove extra runInBackground: step from iOS version -- Java source of Android version now using io.sqlc package - -## 0.7.15-pre - - All iOS operations are now using background processing (reported to resolve intermittent problems with cordova-ios@4.0.1) +- Java source of Android version now using io.sqlc package +- Drop Android-sqlite-connector support +- Drop WP(8) and Windows support -## 0.7.14 +### 0.7.14 - REGEXP support completely removed from this version branch - Remove src/android/libs/.gitignore (inadvertently added in 0.7.13) -## 0.7.13 +### 0.7.13 - REGEXP support partially removed from this version branch - Rename Windows C++ Database close function to closedb to resolve conflict for Windows Store certification @@ -71,79 +57,79 @@ - Amazon Fire-OS support removed - Fix conversion warnings in iOS version -## 0.7.12 +### 0.7.12 - Fix to Windows "Universal" version to support big integers - Implement database close and delete operations for Windows "Universal" - Fix readTransaction to skip BEGIN/COMMIT/ROLLBACK -## 0.7.11 +### 0.7.11 - Fix plugin ID in plugin.xml to match npm package ID - Unpacked sqlite-native-driver.so libraries from jar - Fix conversion of INTEGER type (iOS version) - Disable code to read BLOB as Base-64 (iOS version) due to https://issues.apache.org/jira/browse/CB-9638 -## 0.7.10 +### 0.7.10 - Use Android-sqlite-connector instead of sqlite4java -## 0.7.9 +### 0.7.9 - Build iOS and Windows versions with sqlite 3.8.10.2 embedded - Fix plugin id to match npm package id -## 0.7.8 +### 0.7.8 - Support FTS3/FTS4 and R-Tree in iOS and Windows "Universal" (8.1) versions - Build ARM target with Function Level Linking ref: http://www.monkey-x.com/Community/posts.php?topic=7739 - SQLite3.Windows.vcxproj and SQLite3.WindowsPhone.vcxproj in their own directories to avoid problems due to temporary files -## 0.7.7 +### 0.7.7 - include build of sqlite4java for Android x86_64 and arm-64 - clean publish to plugins.cordova.io -## 0.7.6 +### 0.7.6 - Small fix to plugin id - Disable use of gethostuuid() in sqlite3.c (only used in iOS version) - published to plugins.cordova.io - [BUG] published extra junk in workarea, causing problems with Windows (Universal) version -## 0.7.5 +### 0.7.5 - Windows (Universal) version now supports both Windows 8.1 and Windows Phone 8.1 - iOS and Windows versions are now built with sqlite 3.8.9 embedded - Improved locking style and other optimizations applied for iOS version -## 0.7.4 +### 0.7.4 - iOS and Windows (8.1) versions built to keep non-essential temporary sqlite files in memory - Option to use legacy Android database library, with Android locking/closing issue (BUG #193) workaround included again -## 0.7.3 +### 0.7.3 - insertId & rowsAffected implemented for Windows (8.1) - plugin id changed -## 0.7.2 +### 0.7.2 - Android version with sqlite4java (sqlite 3.8.7 embedded), which solves BUG #193: Android closing/locking issue (ICU-UNICODE integration is now missing) - iOS version fixed to override the correct pluginInitialize method and built with sqlite 3.8.8.3 embedded -## 0.7.1 +### 0.7.1 - Project renamed - Initial version for Windows (8.1) [with sqlite 3.8.8.3 embedded] - Abort initially pending transactions for db handle (due to incorrect password key, for example) [from Cordova-sqlcipher-storage] - WP7 build enabled (NOT TESTED) -## 1.0.6 +### 1.0.6 - Proper handling of transactions that may be requested before the database open operation is completed - Report an error upon attempt to close a database handle object multiple times. -## 1.0.5 +### 1.0.5 - Workaround for Android db locking/closing issue - Fix double-precision REAL values in result (iOS version) @@ -152,22 +138,22 @@ - Fix closing of Android database - Some fixes for SQL API error handling to be consistent with Web SQL -## 1.0.4 +### 1.0.4 - Pre-populated database option (Android/iOS) - Option to select database location to disable iCloud backup (iOS ONLY) - Safeguard against closing of database while transaction is pending - Fix to prevent double marshaling of data -## 1.0.3 +### 1.0.3 - Fixed issue with multi-page apps on Android (due to problem when closing & re-opening app) -## 1.0.2 +### 1.0.2 - Workaround for issue with multiple UPDATE statements WP(8) (#128) -## 1.0.1 +### 1.0.1 - Support Cordova 3.3.0/3.4.0 to support Amazon-FireOS - Fixes for WP(8): diff --git a/README.md b/README.md index 116326e00..dea44b3b0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cordova/PhoneGap sqlite storage adapter (XXX common-dev version) +# Cordova/PhoneGap sqlite storage adapter Native interface to sqlite in a Cordova/PhoneGap plugin for Android, iOS, and Windows, with API similar to HTML5/[Web SQL API](http://www.w3.org/TR/webdatabase/). @@ -6,7 +6,9 @@ License for Android and Windows versions: MIT or Apache 2.0 License for iOS version: MIT only -NOTE (TBD): no Circle CI or Travis CI is setup for this version branch. +|Android Circle-CI (**full** suite)|iOS Travis-CI (*very* limited 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)| ## BREAKING CHANGE: Database location parameter is now mandatory @@ -55,7 +57,7 @@ Some other projects by [@brodybits](https://github.com/brodybits): ## Status -- This version uses a `before_plugin_install` hook to install some dependencies via npm. +- This version uses a `before_plugin_install` hook to install sqlite3 library dependencies from `cordova-sqlite-storage-dependencies` via npm. - A recent version of the Cordova CLI (such as `6.1.1`) is recommended. Cordova versions older than `6.0.0` are not supported by this project. Use of other systems such as PhoneGap CLI, PhoneGap Build, or plugman is not tested and no longer supported. - The iOS database location is now mandatory, as documented below. - This version supports the use of two (2) possible Android sqlite database implementations: @@ -68,8 +70,7 @@ Some other projects by [@brodybits](https://github.com/brodybits): - Amazon Fire-OS is dropped due to lack of support by Cordova. Android version should be used to deploy to Fire-OS 5.0(+) devices. For reference: [cordova/cordova-discuss#32 (comment)](https://github.com/cordova/cordova-discuss/issues/32#issuecomment-167021676) - Windows version using the performant C++ [doo / SQLite3-WinRT](https://github.com/doo/SQLite3-WinRT) component is in an alpha state: - Issue with UNICODE `\u0000` character (same as `\0`) - - No background processing (for future consideration) - - In addition, problems with the Windows version have been reported in case of a Cordova project using a Visual Studio template/extension instead of Cordova/PhoneGap CLI or `plugman` + - No background processing - FTS3, FTS4, and R-Tree support is tested working OK in this version (for all target platforms in this version branch Android/iOS/Windows) - Android is supported back to SDK 10 (a.k.a. Gingerbread, Android 2.3.3); support for older versions is available upon request. - iOS versions supported: 7.x/8.x/9.x @@ -78,8 +79,9 @@ Some other projects by [@brodybits](https://github.com/brodybits): ## Announcements -- Self-test functions to verify proper installation and operation of this plugin - Windows 8.1/Windows Phone 8.1/Windows 10 version is available **here** as well as in [litehelpers / cordova-sqlite-ext](https://github.com/litehelpers/cordova-sqlite-ext) (with pre-populated database support) and [litehelpers / Cordova-sqlite-legacy](https://github.com/litehelpers/Cordova-sqlite-legacy) (with WP8 support). +- Android version is again using the lightweight [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) by default configuration (may be changed as described below) +- Self-test functions to verify proper installation and operation of this plugin - More explicit `openDatabase` and `deleteDatabase` `iosDatabaseLocation` option - Added simple sql batch query function - All iOS operations are now using background processing (reported to resolve intermittent problems with cordova-ios@4.0.1) @@ -88,7 +90,6 @@ Some other projects by [@brodybits](https://github.com/brodybits): - A version with pre-populated database support added for Windows and REGEXP support added for Android is available at: [litehelpers / cordova-sqlite-ext](https://github.com/litehelpers/cordova-sqlite-ext) - ~~PhoneGap Build is now supported through the npm package: http://phonegap.com/blog/2015/05/26/npm-plugins-available/~~ (no longer supported due to reported issues) - [MetaMemoryT / websql-promise](https://github.com/MetaMemoryT/websql-promise) now provides a Promises-based interface to both Web SQL and this plugin -- Android version is now using the lightweight [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) by default configuration (may be changed as described below) - iOS version is now fixed to override the correct pluginInitialize method and should work with recent versions of iOS - [SQLCipher](https://www.zetetic.net/sqlcipher/) for Android/iOS/Windows is supported by [litehelpers / Cordova-sqlcipher-adapter](https://github.com/litehelpers/Cordova-sqlcipher-adapter) @@ -219,7 +220,7 @@ Some other projects by [@brodybits](https://github.com/brodybits): - [object-layer / AnySQL](https://github.com/object-layer/anysql) - Unified SQL API over multiple database engines - [samikrc / CordovaSQLite](https://github.com/samikrc/CordovaSQLite) - Simpler sqlite plugin with a simpler API and browser platform -- [nolanlawson / sqlite-plugin-2](https://github.com/nolanlawson/sqlite-plugin-2) - Simpler fork/partial rewrite (TBD not sure how much of the code, such as iOS code by [@davibe](https://github.com/davibe), is copied/reused) +- [nolanlawson / sqlite-plugin-2](https://github.com/nolanlawson/sqlite-plugin-2) - Simpler fork/rewrite - [nolanlawson / node-websql](https://github.com/nolanlawson/node-websql) - Web SQL API implementation for Node.js - [an-rahulpandey / cordova-plugin-dbcopy](https://github.com/an-rahulpandey/cordova-plugin-dbcopy) - Alternative way to copy pre-populated database - [EionRobb / phonegap-win8-sqlite](https://github.com/EionRobb/phonegap-win8-sqlite) - WebSQL add-on for Win8/Metro apps (perhaps with a different API), using an old version of the C++ library from [SQLite3-WinRT Component](https://github.com/doo/SQLite3-WinRT) (as referenced by [01org / cordova-win8](https://github.com/01org/cordova-win8)) @@ -435,7 +436,7 @@ db.transaction(function(tx) { tx.executeSql('INSERT INTO MyTable VALUES (?)', ['test-value'], function(tx, resultSet) { console.log('resultSet.insertId: ' + resultSet.insertId); console.log('resultSet.rowsAffected: ' + resultSet.rowsAffected); - }, function(error) { + }, function(tx, error) { console.log('INSERT error: ' + error.message); }); }, function(error) { @@ -451,7 +452,7 @@ In case of a read-only transaction, it is possible to use `readTransaction` whic db.readTransaction(function(tx) { tx.executeSql("SELECT UPPER('Some US-ASCII text') AS uppertext", [], function(tx, resultSet) { console.log("resultSet.rows.item(0).uppertext: " + resultSet.rows.item(0).uppertext); - }, function(error) { + }, function(tx, error) { console.log('SELECT error: ' + error.message); }); }, function(error) { @@ -692,7 +693,7 @@ Documentation at: http://ngcordova.com/docs/plugins/sqlite/ npm install -g cordova # (in case you don't have cordova) cordova create MyProjectFolder com.my.project MyProject && cd MyProjectFolder # if you are just starting - cordova plugin add https://github.com/brodybits/Cordova-sqlite-storage-common-dev # XXX TBD + cordova plugin add cordova-sqlite-storage **CLI NOTES:** @@ -708,8 +709,8 @@ You can find some more details in a nice writeup (though with old links and pack ## Plugin installation sources -- https://github.com/brodybits/Cordova-sqlite-storage-common-dev - _XXX_ latest version -- ~~`cordova-sqlite-xxx` - stable npm package version~~ +- `cordova-sqlite-storage` - stable npm package version +- https://github.com/litehelpers/Cordova-sqlite-storage - latest version ## Source tree diff --git a/package.json b/package.json index 9a28abdab..071d357dc 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "cordova-sqlite-storage-common-dev", - "version": "1.4.0-0x-common-dev", - "description": "Native interface to SQLite for PhoneGap/Cordova (xxx common-dev version)", + "name": "cordova-sqlite-storage", + "version": "1.4.0-rc1", + "description": "Native interface to SQLite for PhoneGap/Cordova", "cordova": { - "id": "cordova-sqlite-storage-common-dev", + "id": "cordova-sqlite-storage", "platforms": [ "android", "ios", @@ -12,7 +12,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/brodybits/Cordova-sqlite-storage-common-dev.git" + "url": "https://github.com/litehelpers/Cordova-sqlite-storage.git" }, "keywords": [ "sqlite", @@ -30,10 +30,10 @@ "author": "various", "license": "MIT", "bugs": { - "url": "https://github.com/brodybits/Cordova-sqlite-storage-common-dev/issues" + "url": "https://github.com/litehelpers/Cordova-sqlite-storage/issues" }, - "homepage": "https://github.com/brodybits/Cordova-sqlite-storage-common-dev", + "homepage": "https://github.com/litehelpers/Cordova-sqlite-storage", "dependencies": { - "cordova-sqlite-common-dev-deps": "https://github.com/brodybits/Cordova-sqlite-common-dev-deps.git#0.0.1-common-dev" + "cordova-sqlite-storage-dependencies": "1.0.0" } } diff --git a/plugin.xml b/plugin.xml index d60b7b7f9..09d9e12b4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,10 +1,10 @@ + id="cordova-sqlite-storage" + version="1.4.0-rc1"> - Cordova sqlite storage plugin (common dev version) + Cordova sqlite storage plugin MIT @@ -41,13 +41,13 @@ - + - - - - - + + + + + @@ -63,8 +63,8 @@ - - + diff --git a/scripts/beforePluginInstall.js b/scripts/beforePluginInstall.js index dbccf7e50..6d90c66f8 100644 --- a/scripts/beforePluginInstall.js +++ b/scripts/beforePluginInstall.js @@ -7,7 +7,7 @@ var path = require('path'); var exec = require('child_process').exec; // XXX FUTURE TBD auto-detect: -var package_name = 'cordova-sqlite-storage-common-dev'; +var package_name = 'cordova-sqlite-storage'; module.exports = function (context) { var Q = context.requireCordovaModule('q'); diff --git a/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems b/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems index 3376ab839..fc0eeeb93 100644 --- a/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems +++ b/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems @@ -10,12 +10,12 @@ - %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);$(MSBuildThisFileDirectory)..\..\..\..\node_modules\cordova-sqlite-common-dev-deps + %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);$(MSBuildThisFileDirectory)..\..\..\..\node_modules\cordova-sqlite-storage-dependencies /DSQLITE_TEMP_STORE=2 /DSQLITE_THREADSAFE=2 /DSQLITE_ENABLE_FTS3 /DSQLITE_ENABLE_FTS3_PARENTHESIS /DSQLITE_ENABLE_FTS4 /DSQLITE_ENABLE_COLUMN_METADATA /DSQLITE_ENABLE_RTREE /DSQLITE_OS_WINRT %(AdditionalOptions) - + @@ -25,7 +25,7 @@ - + false