@op-engineering/op-sqlite 2.0.12 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -131,10 +131,16 @@ If you use [prepared statements](#prepared-statements) plus memory mapping and s
131
131
 
132
132
  # Perf flag
133
133
 
134
- You can turn on the performance flag to tweak all possible performance enhancing compilation flags, this greatly affects performance of sqlite itself
134
+ You can turn on the performance flag to tweak all possible performance enhancing compilation flags, this greatly affects performance of sqlite itself:
135
135
 
136
- ```
137
- OP_SQLITE_PERF=1 npx pod-install
136
+ ```sh
137
+ # For iOS install pods with the following env variable, you can also just an export like on Android
138
+ # OP_SQLITE_PERF=1 npx pod-install
139
+
140
+ # For Android you need to export the environment variable before running any command
141
+ export OP_SQLITE_PERF=1
142
+ # then any android build command will use the performance mode
143
+ yarn android
138
144
  ```
139
145
 
140
146
  # SQLite Gotchas
@@ -76,6 +76,10 @@ android {
76
76
 
77
77
  externalNativeBuild {
78
78
  cmake {
79
+ if(System.getenv("OP_SQLITE_PERF") == '1') {
80
+ println "OP_SQLITE performance mode enabled!"
81
+ cFlags "-DSQLITE_DQS=0", "-DSQLITE_THREADSAFE=0", "-DSQLITE_DEFAULT_MEMSTATUS=0", "-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1", "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1", "-DSQLITE_MAX_EXPR_DEPTH=0", "-DSQLITE_OMIT_DEPRECATED=1", "-DSQLITE_OMIT_PROGRESS_CALLBACK=1", "-DSQLITE_OMIT_SHARED_CACHE=1", "-DSQLITE_USE_ALLOCA=1"
82
+ }
79
83
  cppFlags "-O2", "-fexceptions", "-frtti", "-std=c++1y", "-DONANDROID"
80
84
  abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
81
85
  arguments '-DANDROID_STL=c++_shared',
@@ -1,4 +1 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.op.sqlite">
3
-
4
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
package/op-sqlite.podspec CHANGED
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
15
15
  s.platforms = { :ios => "13.0", :osx => "10.15" }
16
16
  s.source = { :git => "https://github.com/op-engineering/op-sqlite.git", :tag => "#{s.version}" }
17
17
 
18
- s.pod_target_xcconfig = {
18
+ xcconfig = {
19
19
  :GCC_PREPROCESSOR_DEFINITIONS => "HAVE_FULLFSYNC=1",
20
20
  :WARNING_CFLAGS => "-Wno-shorten-64-to-32 -Wno-comma -Wno-unreachable-code -Wno-conditional-uninitialized -Wno-deprecated-declarations",
21
21
  :USE_HEADERMAP => "No",
@@ -39,13 +39,9 @@ Pod::Spec.new do |s|
39
39
  end
40
40
 
41
41
  if ENV['OP_SQLITE_PERF'] == '1' then
42
- s.pod_target_xcconfig = {
43
- :GCC_PREPROCESSOR_DEFINITIONS => "HAVE_FULLFSYNC=1",
44
- :WARNING_CFLAGS => "-Wno-shorten-64-to-32 -Wno-comma -Wno-unreachable-code -Wno-conditional-uninitialized -Wno-deprecated-declarations",
45
- :USE_HEADERMAP => "No",
46
- :CLANG_CXX_LANGUAGE_STANDARD => "c++17",
47
- :OTHER_CFLAGS => '$(inherited) -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_SHARED_CACHE=1 -DSQLITE_USE_ALLOCA=1'
48
- }
42
+ xcconfig[:OTHER_CFLAGS] = '$(inherited) -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_SHARED_CACHE=1 -DSQLITE_USE_ALLOCA=1'
49
43
  end
44
+
45
+ s.pod_target_xcconfig = xcconfig
50
46
 
51
47
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@op-engineering/op-sqlite",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Next generation SQLite for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",