Skip to content

Commit

Permalink
cordova-sqlite-ext build flag updates
Browse files Browse the repository at this point in the history
- SQLITE_THREADSAFE=2 on iOS as well as macOS (SQLITE_THREADSAFE=1 on
  Android/Windows) to avoid possible malformed database due to
  multithreaded access ref: storesafe/cordova-sqlite-storage#703
- Suppress warnings for sqlite3.c on iOS/macOS
  Thanks again to @cjpearson for the suggestion in
  storesafe/cordova-sqlite-storage#569
- Some additional iOS build flag updates in this plugin version
  • Loading branch information
Christopher J. Brody committed Dec 20, 2017
1 parent 73da6c5 commit ca2a6f2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
7 changes: 5 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changes

## cordova-sqlite-ext 0.10.7-pre1
## cordova-sqlite-ext 0.10.7-pre2

TBD
- cordova-sqlite-ext build flag fixes:
- SQLite (3.15.2) build with SQLITE_THREADSAFE=2 on iOS as well as macOS to avoid possible malformed database due to multithreaded access ref: litehelpers/Cordova-sqlite-storage#703
- Suppress warnings when building sqlite3.c on iOS/macOS
- Some additional iOS build flag updates in this plugin version

## cordova-sqlite-ext 0.10.6

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,20 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
- REGEXP for Android (default Android-sqlite-connector database 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)
- DEPRECATED and WILL BE REMOVED in the near future: BLOB data reading (from pre-populated database) for Android/iOS, with the following caveat for the Android version: the database must be opened with the `androidDatabaseImplementation: 2` option to use the built-in android.database implementation. **RECOMMENDED SOLUTION**: use SELECT BASE64(column) to SELECT BLOB data as described below (WITHOUT use of the `androidDatabaseImplementation: 2` setting).
- SQLite version `3.15.2` included when building with the following build settings:
- `SQLITE_THREADSAFE=1` (`SQLITE_THREADSAFE=2` on macOS ONLY)
- `SQLITE_DEFAULT_MEMSTATUS=0` (macOS only)
- `SQLITE_OMIT_DECLTYPE` (macOS only)
- `SQLITE_OMIT_DEPRECATED` (macOS only)
- `SQLITE_OMIT_PROGRESS_CALLBACK` (macOS only)
- `SQLITE_OMIT_SHARED_CACHE` (macOS only)
- `SQLITE_THREADSAFE=2` on iOS/macOS (`SQLITE_THREADSAFE=1` on Android/Windows)
- `SQLITE_DEFAULT_MEMSTATUS=0` (iOS/macOS only)
- `SQLITE_OMIT_DECLTYPE` (iOS/macOS only)
- `SQLITE_OMIT_DEPRECATED` (iOS/macOS only)
- `SQLITE_OMIT_PROGRESS_CALLBACK` (iOS/macOS only)
- `SQLITE_OMIT_SHARED_CACHE` (iOS/macOS only)
- `SQLITE_TEMP_STORE=2`
- `SQLITE_OMIT_LOAD_EXTENSION`
- `SQLITE_ENABLE_FTS3`
- `SQLITE_ENABLE_FTS3_PARENTHESIS`
- `SQLITE_ENABLE_FTS4`
- `SQLITE_ENABLE_RTREE`
- `SQLITE_DEFAULT_PAGE_SIZE=1024` and `SQLITE_DEFAULT_CACHE_SIZE=2000` to avoid "potentially distruptive change(s)" from SQLite 3.12.0 ref: <http://sqlite.org/pgszchng2016.html>
- `SQLITE_OMIT_BUILTIN_TEST` - TBD unwanted option to be removed in the near future (Android/iOS/Windows)
- `SQLITE_OMIT_BUILTIN_TEST` - TBD unwanted option to be removed in the near future (Android/Windows)
- `SQLITE_OS_WINRT` (Windows only)
- This version supports the use of two (2) possible Android sqlite database implementations:
- default: lightweight [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) (using [brodybits / Android-sqlite-ext-native-driver](https://github.com/brodybits/Android-sqlite-ext-native-driver))
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-ext",
"version": "0.10.7-pre1",
"version": "0.10.7-pre2",
"description": "Native interface to SQLite for PhoneGap/Cordova with extra features",
"cordova": {
"id": "cordova-sqlite-ext",
Expand Down
6 changes: 3 additions & 3 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-ext"
version="0.10.7-pre1">
version="0.10.7-pre2">

<name>Cordova sqlite storage plugin with extra features</name>

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

<header-file src="node_modules/cordova-sqlite-ext-deps/sqlite3.h" />
<source-file src="node_modules/cordova-sqlite-ext-deps/sqlite3.c"
compiler-flags="-DSQLITE_TEMP_STORE=2 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_CACHE_SIZE=2000" />
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" />
</platform>

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

<header-file src="node_modules/cordova-sqlite-ext-deps/sqlite3.h" />
<source-file src="node_modules/cordova-sqlite-ext-deps/sqlite3.c"
compiler-flags="-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" />
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" />
</platform>

<!-- windows -->
Expand Down

0 comments on commit ca2a6f2

Please sign in to comment.