@op-engineering/op-sqlite 11.2.9 → 11.2.10
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/cpp/bridge.cpp +7 -5
- package/package.json +1 -1
package/cpp/bridge.cpp
CHANGED
|
@@ -68,14 +68,16 @@ std::string opsqlite_get_db_path(std::string const &db_name,
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
mkdir(location);
|
|
71
|
-
|
|
71
|
+
char resolved_path[PATH_MAX];
|
|
72
|
+
realpath((location + "/" + db_name).c_str(), resolved_path);
|
|
73
|
+
return std::string(resolved_path);
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
#ifdef OP_SQLITE_USE_SQLCIPHER
|
|
75
77
|
sqlite3 *opsqlite_open(std::string const &name, std::string const &path,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
std::string const &crsqlite_path,
|
|
79
|
+
std::string const &sqlite_vec_path,
|
|
80
|
+
std::string const &encryption_key) {
|
|
79
81
|
#else
|
|
80
82
|
sqlite3 *opsqlite_open(std::string const &name, std::string const &path,
|
|
81
83
|
[[maybe_unused]] std::string const &crsqlite_path,
|
|
@@ -95,7 +97,7 @@ sqlite3 *opsqlite_open(std::string const &name, std::string const &path,
|
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
#ifdef OP_SQLITE_USE_SQLCIPHER
|
|
98
|
-
if(!encryption_key.empty()) {
|
|
100
|
+
if (!encryption_key.empty()) {
|
|
99
101
|
opsqlite_execute(db, "PRAGMA key = '" + encryption_key + "'", nullptr);
|
|
100
102
|
}
|
|
101
103
|
#endif
|