Skip to content

Commit

Permalink
Fix sqlcipher compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Aug 28, 2024
1 parent 3bb93c9 commit 4f9fead
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/DBHostObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ DBHostObject::DBHostObject(jsi::Runtime &rt, std::string &base_path,

#ifdef OP_SQLITE_USE_SQLCIPHER
BridgeResult result =
opsqlite_open(db_name, path, crsqlite_path, encryption_key);
opsqlite_open(db_name, path, crsqlite_path, sqlite_vec_path, encryption_key);
#elif OP_SQLITE_USE_LIBSQL
BridgeResult result = opsqlite_libsql_open(db_name, path, crsqlite_path);
#else
Expand Down
3 changes: 2 additions & 1 deletion cpp/bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ std::string opsqlite_get_db_path(std::string const &db_name,

#ifdef OP_SQLITE_USE_SQLCIPHER
BridgeResult opsqlite_open(std::string const &dbName, std::string const &dbPath,
std::string const &crsqlitePath,
std::string const &crsqlite_path,
std::string const &sqlite_vec_path,
std::string const &encryptionKey);
#else
BridgeResult opsqlite_open(std::string const &dbName, std::string const &dbPath,
Expand Down
1 change: 1 addition & 0 deletions example/src/tests/dbsetup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export function dbSetupTests() {
location: ANDROID_EXTERNAL_FILES_PATH,
encryptionKey: 'test',
});

androidDb.execute('DROP TABLE IF EXISTS User;');
androidDb.execute(
'CREATE TABLE User ( id INT PRIMARY KEY, name TEXT NOT NULL, age INT, networth REAL) STRICT;',
Expand Down

0 comments on commit 4f9fead

Please sign in to comment.