Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/android/build.gradle b/android/build.gradle
index 7df016db4507ab4a0c216622d15a9263b91f2cf2..dc94a38d57fd313e9bb40e0ef22f2e10034c57e6 100644
index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f545d8dc83c 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,4 @@
Expand Down Expand Up @@ -69,7 +69,7 @@ index 7df016db4507ab4a0c216622d15a9263b91f2cf2..dc94a38d57fd313e9bb40e0ef22f2e10
println "[OP-SQLITE] using sqlcipher."
} else if(useLibsql) {
diff --git a/android/cpp-adapter.cpp b/android/cpp-adapter.cpp
index 5912d7b1ce5947d49418c34b60d7abbaf0810157..f2cb85bf3f01964669a216d6de06f5bb5d8846d2 100644
index 8feaf7719661ef248113f11b1643deedb4b510af..2393963bf982f80ccff2ed396f1538be7ee18fcb 100644
--- a/android/cpp-adapter.cpp
+++ b/android/cpp-adapter.cpp
@@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
Expand All @@ -79,7 +79,7 @@ index 5912d7b1ce5947d49418c34b60d7abbaf0810157..f2cb85bf3f01964669a216d6de06f5bb
- makeNativeMethod("clearStateNativeJsi",
- OPSQLiteBridge::clearStateNativeJsi)});
+ makeNativeMethod("clearStateNativeJsi", OPSQLiteBridge::clearStateNativeJsi),
+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
}

private:
Expand All @@ -89,7 +89,7 @@ index 5912d7b1ce5947d49418c34b60d7abbaf0810157..f2cb85bf3f01964669a216d6de06f5bb
}
+
+ static bool deleteAllDBsJsi(jni::alias_ref<jni::JObject> thiz) {
+ return opsqlite::deleteAllDbs();
+ return opsqlite::deleteAllDbs();
+ }
};

Expand Down Expand Up @@ -118,20 +118,20 @@ index 44f86df6a21a6f7272b2c79b196586ef8fec886b..9d9f7100fd34361701b2addf09a4f36e
val instance = OPSQLiteBridge()
}
diff --git a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
index 49a01b9f92641ed8c4ab91efe5fac4d42a0d4894..bdfa8294b3c876b563b9f7ea1efabd243ac5b12e 100644
index 688832fa2f9a7f91d16cd50495caa8c9f8873864..9ea814bfa63f27356e804b82e941b7121152db3a 100644
--- a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
+++ b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
@@ -12,7 +12,7 @@ import java.io.InputStream
import java.io.OutputStream
@@ -13,7 +13,7 @@ import java.io.OutputStream
import com.facebook.react.util.RNLog;

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

+ @ReactMethod(isBlockingSynchronousMethod = true)
Expand All @@ -143,15 +143,16 @@ index 49a01b9f92641ed8c4ab91efe5fac4d42a0d4894..bdfa8294b3c876b563b9f7ea1efabd24
+ fun deleteAllDBs() {
+ OPSQLiteBridge.instance.deleteAllDBs();
+ }
+
+
@ReactMethod
fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
val filename = args.getString("filename")!!
diff --git a/cpp/DBHostObject.cpp b/cpp/DBHostObject.cpp
index eadea09354386b93831e22acfc7511b473b351d5..5701d158f3aa614c7aff9e99ad5ea68a271782b5 100644
index 85710eea286d45685aa526ed3851e8f1e1411039..8cf10f21ba467dea430aab106d43dd4e2adeacd6 100644
--- a/cpp/DBHostObject.cpp
+++ b/cpp/DBHostObject.cpp
@@ -675,6 +675,10 @@ void DBHostObject::invalidate() {
@@ -889,6 +889,10 @@ void DBHostObject::invalidate() {
#endif
}

Expand All @@ -163,23 +164,23 @@ index eadea09354386b93831e22acfc7511b473b351d5..5701d158f3aa614c7aff9e99ad5ea68a

} // namespace opsqlite
diff --git a/cpp/DBHostObject.h b/cpp/DBHostObject.h
index 68a9bc496501307510db9c829886b0c73ac67a04..142e9d9b3398decd467b167f00350a63f46857f2 100644
index cc174b7c8c5ce500a6ffe5dc6fe092d282d2554c..ff36f742a22b8a84f37d6dd28441dbe9d0c6c873 100644
--- a/cpp/DBHostObject.h
+++ b/cpp/DBHostObject.h
@@ -68,6 +68,7 @@ public:
void on_commit();
void on_rollback();
void invalidate();
+ void drop();
~DBHostObject() override;
@@ -73,6 +73,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject {
void on_commit();
void on_rollback();
void invalidate();
+ void drop();
~DBHostObject() override;

private:
diff --git a/cpp/OPSqlite.cpp b/cpp/OPSqlite.cpp
index e33579af9527e8257b7c4fc38ef501a12fb848ce..791fa709faf35f60c9f9f3f1be43f814fef7dc45 100644
--- a/cpp/OPSqlite.cpp
+++ b/cpp/OPSqlite.cpp
@@ -42,6 +42,13 @@ void invalidate() {
dbs.clear();
private:
diff --git a/cpp/bindings.cpp b/cpp/bindings.cpp
index 5e1c1de234e7bdb131769728fc862d389f9995a5..dc21c6503ffe18f3ae1cf99f327e8aa1fc587b71 100644
--- a/cpp/bindings.cpp
+++ b/cpp/bindings.cpp
@@ -36,6 +36,13 @@ void invalidate() {
dbs.clear();
}

+bool deleteAllDbs() {
Expand All @@ -190,12 +191,12 @@ index e33579af9527e8257b7c4fc38ef501a12fb848ce..791fa709faf35f60c9f9f3f1be43f814
+}
+
void install(jsi::Runtime &rt,
const std::shared_ptr<react::CallInvoker> &_invoker,
const std::shared_ptr<react::CallInvoker> &invoker,
const char *base_path, const char *crsqlite_path,
diff --git a/cpp/OPSqlite.hpp b/cpp/OPSqlite.hpp
diff --git a/cpp/bindings.h b/cpp/bindings.h
index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d88f260bf 100644
--- a/cpp/OPSqlite.hpp
+++ b/cpp/OPSqlite.hpp
--- a/cpp/bindings.h
+++ b/cpp/bindings.h
@@ -14,6 +14,7 @@ void install(jsi::Runtime &rt,
const char *base_path, const char *crsqlite_path,
const char *sqlite_vec_path);
Expand All @@ -205,33 +206,18 @@ index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d

} // namespace opsqlite
diff --git a/op-sqlite.podspec b/op-sqlite.podspec
index 32906a25cf057695d868bd0eaadb7b973b2aa8f7..4a1e452117fb7c61b33dd346aa120abfc691089e 100644
index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04de783dcb0 100644
--- a/op-sqlite.podspec
+++ b/op-sqlite.podspec
@@ -1,12 +1,13 @@
@@ -1,4 +1,3 @@
-require "json"
require_relative "./generate_tokenizers_header_file"

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

+# NOTE: Disabled as redundant for now, re-enable if needed
# In the sample app the dir is not inside of node_modules
-is_user_app = __dir__.include?("node_modules")
+# is_user_app = __dir__.include?("node_modules")
+is_user_app = false
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
app_package = nil
package_json_path = nil
@@ -32,13 +33,13 @@ else
package_json_path = File.join(__dir__, "example", "package.json")
end

-app_package = JSON.parse(File.read(package_json_path))
+# NOTE: Disabled as redundant for now, re-enable if needed
+# app_package = JSON.parse(File.read(package_json_path))

-op_sqlite_config = app_package["op-sqlite"]
-use_sqlcipher = false
+use_sqlcipher = true
Expand All @@ -242,7 +228,7 @@ index 32906a25cf057695d868bd0eaadb7b973b2aa8f7..4a1e452117fb7c61b33dd346aa120abf
phone_version = false
sqlite_flags = ""
fts5 = false
@@ -46,37 +47,6 @@ rtree = false
@@ -51,37 +49,6 @@ rtree = false
use_sqlite_vec = false
tokenizers = []

Expand All @@ -261,19 +247,19 @@ index 32906a25cf057695d868bd0eaadb7b973b2aa8f7..4a1e452117fb7c61b33dd346aa120abf
-
-if phone_version then
- if use_sqlcipher then
- raise "SQLCipher is not supported with phone version. It cannot load extensions."
- raise "SQLCipher is not supported with phone version"
- end
-
- if use_crsqlite then
- raise "CRSQLite is not supported with phone version. It cannot load extensions."
- raise "CRSQLite is not supported with phone version"
- end
-
- if rtree then
- raise "RTree is not supported with phone version. It cannot load extensions."
- raise "RTree is not supported with phone version"
- end
-
- if use_sqlite_vec then
- raise "SQLite Vec is not supported with phone version. It cannot load extensions."
- raise "SQLite Vec is not supported with phone version"
- end
-end
-
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- We downgraded the `OPSqlite` to v15.0.7 to align it with `make-it-native` and `native-template`.

## [v0.3.2] - 2026-01-16

- We updated the `OPSqlite` with compatibility for ANdroid 16kb page alignment.
Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PODS:
- hermes-engine (0.78.2):
- hermes-engine/Pre-built (= 0.78.2)
- hermes-engine/Pre-built (0.78.2)
- MendixNative (0.3.1):
- MendixNative (0.3.2):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -34,7 +34,7 @@ PODS:
- RNCAsyncStorage
- SSZipArchive
- Yoga
- op-sqlite (15.1.5):
- op-sqlite (15.0.7):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1851,8 +1851,8 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
hermes-engine: 2771b98fb813fdc6f92edd7c9c0035ecabf9fee7
MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887
op-sqlite: e8590c98ed3f69c072eea7949bfa214088d3f5c1
MendixNative: 5d4f642347f8d28bdf18e0af822bdb0ff830a430
op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
RCTDeprecation: be794de7dc6ed8f9f7fbf525f86e7651b8b68746
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pod": "(cd ios && bundle install && bundle exec pod install)"
},
"dependencies": {
"@op-engineering/op-sqlite": "15.1.5",
"@op-engineering/op-sqlite": "15.0.7",
"@react-native-async-storage/async-storage": "2.1.1",
"react": "19.0.0",
"react-native": "0.78.2",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@eslint/compat": "1.3.2",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.35.0",
"@op-engineering/op-sqlite": "15.1.5",
"@op-engineering/op-sqlite": "15.0.7",
"@react-native-async-storage/async-storage": "2.1.1",
"@react-native-community/cli": "18.0.1",
"@react-native/babel-preset": "0.78.2",
Expand Down Expand Up @@ -176,6 +176,6 @@
"version": "0.55.1"
},
"resolutions": {
"@op-engineering/op-sqlite@15.1.5": "patch:@op-engineering/op-sqlite@npm%3A15.1.5#./.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch"
"@op-engineering/op-sqlite@15.0.7": "patch:@op-engineering/op-sqlite@npm%3A15.0.7#./.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch"
}
}
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2910,23 +2910,23 @@ __metadata:
languageName: node
linkType: hard

"@op-engineering/op-sqlite@npm:15.1.5":
version: 15.1.5
resolution: "@op-engineering/op-sqlite@npm:15.1.5"
"@op-engineering/op-sqlite@npm:15.0.7":
version: 15.0.7
resolution: "@op-engineering/op-sqlite@npm:15.0.7"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/61520373463c476191a6e6260ea67edf068bf927abf7137064dcd85f134282a4429b76ad3a3cf8a3a913cbbaf6da8219474692e9d4afef8a0171c4edd655a37d
checksum: 10/574fb9ad485f8d383efd8a5237bf80e4f152d8123be59f7820fa21b435ce504e4062bc8157d9e77b70e8339f2f81623f8d3662d3a06f0edaa85252a3eb788881
languageName: node
linkType: hard

"@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.1.5#./.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch::locator=mendix-native%40workspace%3A.":
version: 15.1.5
resolution: "@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.1.5#./.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch::version=15.1.5&hash=d88be6&locator=mendix-native%40workspace%3A."
"@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.0.7#./.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch::locator=mendix-native%40workspace%3A.":
version: 15.0.7
resolution: "@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.0.7#./.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch::version=15.0.7&hash=686531&locator=mendix-native%40workspace%3A."
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/7172afb32afe368512981ce7e9873325915415b3c4da0cd1385a572cf9bb301c16ba9b4155827d20a39159f53b5a79d9052de727c412a5a5f2f5775ece464155
checksum: 10/8a8182fea37e02cf44b75aa2a77b5f9bbe698e698fa7fdfc1450bd9a3343e6ff765f5baecae98d20eae4410cfac5409f1e8069a438036d6d40eebed9ae1dbef8
languageName: node
linkType: hard

Expand Down Expand Up @@ -9196,7 +9196,7 @@ __metadata:
"@babel/core": "npm:7.25.2"
"@babel/preset-env": "npm:7.25.3"
"@babel/runtime": "npm:7.25.0"
"@op-engineering/op-sqlite": "npm:15.1.5"
"@op-engineering/op-sqlite": "npm:15.0.7"
"@react-native-async-storage/async-storage": "npm:2.1.1"
"@react-native-community/cli": "npm:18.0.1"
"@react-native-community/cli-platform-android": "npm:18.0.1"
Expand All @@ -9221,7 +9221,7 @@ __metadata:
"@eslint/compat": "npm:1.3.2"
"@eslint/eslintrc": "npm:3.3.1"
"@eslint/js": "npm:9.35.0"
"@op-engineering/op-sqlite": "npm:15.1.5"
"@op-engineering/op-sqlite": "npm:15.0.7"
"@react-native-async-storage/async-storage": "npm:2.1.1"
"@react-native-community/cli": "npm:18.0.1"
"@react-native/babel-preset": "npm:0.78.2"
Expand Down