Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
cordova-sqlite-evplus-legacy-attach-detach-free build flag updates be…
Browse files Browse the repository at this point in the history
…fore merge

    - SQLITE_THREADSAFE=2 on iOS & macOS (SQLITE_THREADSAFE=1 on
      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/macOS/Windows build flag updates
      in this plugin version
    - Document sqlite (3.8.10.2) build settings
  • Loading branch information
Christopher J. Brody committed Dec 31, 2017
1 parent d97b0fb commit 72015ed
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ As documented in the "**A User’s iCloud Storage Is Limited**" section of [iClo
- Status for the target platforms:
- Android: now using [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) (with sqlite `3.8.10.2`), with support for FTS3/FTS4 and R-Tree, and REGEXP support using PCRE 8.37 as built from [liteglue / Android-sqlite-native-driver-regexp-pcre](https://github.com/liteglue/Android-sqlite-native-driver-regexp-pcre)
- iOS/macOS/Windows: sqlite `3.8.10.2` embedded
- SQLite `3.8.10.2` included in this plugin version, with the following definitions:
- `NDEBUG` on Windows (Release build only)
- `SQLITE_THREADSAFE=2` on Android/iOS/macOS (`SQLITE_THREADSAFE=1` on Windows)
- `SQLITE_DEFAULT_MEMSTATUS=0` (iOS/macOS/Windows)
- ~~`SQLITE_OMIT_DECLTYPE`~~ (TBD issue with this option on sqlite 3.8.10.2)
- `SQLITE_OMIT_DEPRECATED` (iOS/macOS/Windows)
- `SQLITE_OMIT_PROGRESS_CALLBACK` (iOS/macOS/Windows)
- `SQLITE_OMIT_SHARED_CACHE` (iOS/macOS/Windows)
- `SQLITE_TEMP_STORE=2`
- `SQLITE_OMIT_LOAD_EXTENSION` (iOS/macOS/Windows)
- `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 FUTURE TBD "potentially distruptive change(s)" from SQLite 3.12.0 ref: <http://sqlite.org/pgszchng2016.html>
- `SQLITE_OS_WINRT` (Windows only)
- Windows version is TBD:
- Issue with UNICODE `\u0000` character (same as `\0`)
- No background processing (for future consideration)
Expand Down
6 changes: 4 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
<source-file src="src/ios/SQLitePlugin.m" />

<header-file src="src/common/sqlite3.h" />
<source-file src="src/common/sqlite3.c" />
<source-file src="src/common/sqlite3.c"
compiler-flags="-w -DSQLITE_THREADSAFE=2 -DSQLITE_DEFAULT_MEMSTATUS=0 -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 All @@ -70,7 +71,8 @@
<source-file src="src/ios/SQLitePlugin.m" />

<header-file src="src/common/sqlite3.h" />
<source-file src="src/common/sqlite3.c" />
<source-file src="src/common/sqlite3.c"
compiler-flags="-w -DSQLITE_THREADSAFE=2 -DSQLITE_DEFAULT_MEMSTATUS=0 -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
3 changes: 2 additions & 1 deletion src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
<AdditionalOptions>/DSQLITE_THREADSAFE=1 /DSQLITE_DEFAULT_MEMSTATUS=0 /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 /DSQLITE_OS_WINRT %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand All @@ -34,4 +35,4 @@
<ItemGroup>
<ProjectCapability Include="SourceItemsFromImports" />
</ItemGroup>
</Project>
</Project>

0 comments on commit 72015ed

Please sign in to comment.