Skip to content

Commit 1e2e0b9

Browse files
Merge pull request #1154 from mendix/revert-opsqlite-17xx
Revert OPSQLite to v15.0.7
2 parents a630ead + 9d6a4de commit 1e2e0b9

4 files changed

Lines changed: 55 additions & 65 deletions

File tree

ios/Podfile.lock

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ PODS:
5252
- RNCAsyncStorage
5353
- SSZipArchive
5454
- Yoga
55-
- op-sqlite (15.1.5):
55+
- op-sqlite (15.0.7):
5656
- DoubleConversion
5757
- glog
5858
- hermes-engine
59+
- OpenSSL-Universal
5960
- RCT-Folly (= 2024.11.18.00)
6061
- RCTRequired
6162
- RCTTypeSafety
@@ -73,6 +74,7 @@ PODS:
7374
- ReactCommon/turbomodule/bridging
7475
- ReactCommon/turbomodule/core
7576
- Yoga
77+
- OpenSSL-Universal (3.3.3001)
7678
- RCT-Folly (2024.11.18.00):
7779
- boost
7880
- DoubleConversion
@@ -2348,6 +2350,7 @@ SPEC REPOS:
23482350
- libavif
23492351
- libdav1d
23502352
- libwebp
2353+
- OpenSSL-Universal
23512354
- SDWebImage
23522355
- SDWebImageAVIFCoder
23532356
- SDWebImageWebPCoder
@@ -2546,7 +2549,8 @@ SPEC CHECKSUMS:
25462549
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
25472550
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
25482551
MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887
2549-
op-sqlite: a8239b295e2fad068d587c16d6c41d1ffd98ede8
2552+
op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855
2553+
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
25502554
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
25512555
RCTDeprecation: be794de7dc6ed8f9f7fbf525f86e7651b8b68746
25522556
RCTRequired: a83787b092ec554c2eb6019ff3f5b8d125472b3b

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"dependencies": {
1111
"@d11/react-native-fast-image": "8.11.1",
1212
"@gorhom/bottom-sheet": "5.1.1",
13-
"mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.2/mendix-native-v0.3.2.tgz",
14-
"@op-engineering/op-sqlite": "15.1.5",
13+
"mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz",
14+
"@op-engineering/op-sqlite": "15.0.7",
1515
"@react-native-async-storage/async-storage": "2.0.0",
1616
"@react-native-camera-roll/camera-roll": "7.4.0",
1717
"@react-native-community/cli": "18.0.1",

patches/@op-engineering+op-sqlite+15.1.5.patch renamed to patches/@op-engineering+op-sqlite+15.0.7.patch

Lines changed: 39 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@op-engineering/op-sqlite/android/build.gradle b/node_modules/@op-engineering/op-sqlite/android/build.gradle
2-
index 7df016d..dc94a38 100644
2+
index d36fd85..7513556 100644
33
--- a/node_modules/@op-engineering/op-sqlite/android/build.gradle
44
+++ b/node_modules/@op-engineering/op-sqlite/android/build.gradle
55
@@ -1,5 +1,4 @@
@@ -69,7 +69,7 @@ index 7df016d..dc94a38 100644
6969
println "[OP-SQLITE] using sqlcipher."
7070
} else if(useLibsql) {
7171
diff --git a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
72-
index 5912d7b..f2cb85b 100644
72+
index 8feaf77..261ec22 100644
7373
--- a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
7474
+++ b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
7575
@@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
@@ -79,7 +79,7 @@ index 5912d7b..f2cb85b 100644
7979
- makeNativeMethod("clearStateNativeJsi",
8080
- OPSQLiteBridge::clearStateNativeJsi)});
8181
+ makeNativeMethod("clearStateNativeJsi", OPSQLiteBridge::clearStateNativeJsi),
82-
+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
82+
+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
8383
}
8484

8585
private:
@@ -89,7 +89,7 @@ index 5912d7b..f2cb85b 100644
8989
}
9090
+
9191
+ static bool deleteAllDBsJsi(jni::alias_ref<jni::JObject> thiz) {
92-
+ return opsqlite::deleteAllDbs();
92+
+ return opsqlite::deleteAllDbs();
9393
+ }
9494
};
9595

@@ -118,20 +118,20 @@ index 44f86df..9d9f710 100644
118118
val instance = OPSQLiteBridge()
119119
}
120120
diff --git a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
121-
index 49a01b9..bdfa829 100644
121+
index 688832f..9ea814b 100644
122122
--- a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
123123
+++ b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
124-
@@ -12,7 +12,7 @@ import java.io.InputStream
125-
import java.io.OutputStream
124+
@@ -13,7 +13,7 @@ import java.io.OutputStream
126125
import com.facebook.react.util.RNLog;
127126

127+
//@ReactModule(name = OPSQLiteModule.NAME)
128128
-internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
129129
+class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
130130
override fun getName(): String {
131131
return NAME
132132
}
133-
@@ -54,6 +54,16 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134-
throw Exception("Do not call getDylibPath on Android")
133+
@@ -56,6 +56,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134+
return true
135135
}
136136

137137
+ @ReactMethod(isBlockingSynchronousMethod = true)
@@ -143,15 +143,16 @@ index 49a01b9..bdfa829 100644
143143
+ fun deleteAllDBs() {
144144
+ OPSQLiteBridge.instance.deleteAllDBs();
145145
+ }
146+
+
146147
+
147148
@ReactMethod
148149
fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
149150
val filename = args.getString("filename")!!
150151
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
151-
index eadea09..5701d15 100644
152+
index 85710ee..8cf10f2 100644
152153
--- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
153154
+++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
154-
@@ -675,6 +675,10 @@ void DBHostObject::invalidate() {
155+
@@ -889,6 +889,10 @@ void DBHostObject::invalidate() {
155156
#endif
156157
}
157158

@@ -163,23 +164,23 @@ index eadea09..5701d15 100644
163164

164165
} // namespace opsqlite
165166
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
166-
index 68a9bc4..142e9d9 100644
167+
index cc174b7..ff36f74 100644
167168
--- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
168169
+++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
169-
@@ -68,6 +68,7 @@ public:
170-
void on_commit();
171-
void on_rollback();
172-
void invalidate();
173-
+ void drop();
174-
~DBHostObject() override;
170+
@@ -73,6 +73,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject {
171+
void on_commit();
172+
void on_rollback();
173+
void invalidate();
174+
+ void drop();
175+
~DBHostObject() override;
175176

176-
private:
177-
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp
178-
index e33579a..791fa70 100644
179-
--- a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp
180-
+++ b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.cpp
181-
@@ -42,6 +42,13 @@ void invalidate() {
182-
dbs.clear();
177+
private:
178+
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp b/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp
179+
index 5e1c1de..dc21c65 100644
180+
--- a/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp
181+
+++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings.cpp
182+
@@ -36,6 +36,13 @@ void invalidate() {
183+
dbs.clear();
183184
}
184185

185186
+bool deleteAllDbs() {
@@ -190,12 +191,12 @@ index e33579a..791fa70 100644
190191
+}
191192
+
192193
void install(jsi::Runtime &rt,
193-
const std::shared_ptr<react::CallInvoker> &_invoker,
194+
const std::shared_ptr<react::CallInvoker> &invoker,
194195
const char *base_path, const char *crsqlite_path,
195-
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp
196+
diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings.h b/node_modules/@op-engineering/op-sqlite/cpp/bindings.h
196197
index 91511ab..cc73dfe 100644
197-
--- a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp
198-
+++ b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp
198+
--- a/node_modules/@op-engineering/op-sqlite/cpp/bindings.h
199+
+++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings.h
199200
@@ -14,6 +14,7 @@ void install(jsi::Runtime &rt,
200201
const char *base_path, const char *crsqlite_path,
201202
const char *sqlite_vec_path);
@@ -205,33 +206,18 @@ index 91511ab..cc73dfe 100644
205206

206207
} // namespace opsqlite
207208
diff --git a/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec b/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec
208-
index 32906a2..4a1e452 100644
209+
index 375cc3e..e6fce21 100644
209210
--- a/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec
210211
+++ b/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec
211-
@@ -1,12 +1,13 @@
212+
@@ -1,4 +1,3 @@
212213
-require "json"
213214
require_relative "./generate_tokenizers_header_file"
214215

215216
log_message = lambda do |message|
216-
puts "\e[34m#{message}\e[0m"
217+
@@ -39,11 +38,10 @@ else
218+
app_package = JSON.parse(File.read(File.join(__dir__, "example", "package.json")))
217219
end
218220

219-
+# NOTE: Disabled as redundant for now, re-enable if needed
220-
# In the sample app the dir is not inside of node_modules
221-
-is_user_app = __dir__.include?("node_modules")
222-
+# is_user_app = __dir__.include?("node_modules")
223-
+is_user_app = false
224-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
225-
app_package = nil
226-
package_json_path = nil
227-
@@ -32,13 +33,13 @@ else
228-
package_json_path = File.join(__dir__, "example", "package.json")
229-
end
230-
231-
-app_package = JSON.parse(File.read(package_json_path))
232-
+# NOTE: Disabled as redundant for now, re-enable if needed
233-
+# app_package = JSON.parse(File.read(package_json_path))
234-
235221
-op_sqlite_config = app_package["op-sqlite"]
236222
-use_sqlcipher = false
237223
+use_sqlcipher = true
@@ -242,7 +228,7 @@ index 32906a2..4a1e452 100644
242228
phone_version = false
243229
sqlite_flags = ""
244230
fts5 = false
245-
@@ -46,37 +47,6 @@ rtree = false
231+
@@ -51,37 +49,6 @@ rtree = false
246232
use_sqlite_vec = false
247233
tokenizers = []
248234

@@ -261,19 +247,19 @@ index 32906a2..4a1e452 100644
261247
-
262248
-if phone_version then
263249
- if use_sqlcipher then
264-
- raise "SQLCipher is not supported with phone version. It cannot load extensions."
250+
- raise "SQLCipher is not supported with phone version"
265251
- end
266252
-
267253
- if use_crsqlite then
268-
- raise "CRSQLite is not supported with phone version. It cannot load extensions."
254+
- raise "CRSQLite is not supported with phone version"
269255
- end
270256
-
271257
- if rtree then
272-
- raise "RTree is not supported with phone version. It cannot load extensions."
258+
- raise "RTree is not supported with phone version"
273259
- end
274260
-
275261
- if use_sqlite_vec then
276-
- raise "SQLite Vec is not supported with phone version. It cannot load extensions."
262+
- raise "SQLite Vec is not supported with phone version"
277263
- end
278264
-end
279265
-

0 commit comments

Comments
 (0)