@op-engineering/op-sqlite 11.2.3 → 11.2.5

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.
@@ -207,8 +207,8 @@ android {
207
207
  }
208
208
 
209
209
  compileOptions {
210
- sourceCompatibility JavaVersion.VERSION_1_8
211
- targetCompatibility JavaVersion.VERSION_1_8
210
+ sourceCompatibility JavaVersion.VERSION_17
211
+ targetCompatibility JavaVersion.VERSION_17
212
212
  }
213
213
 
214
214
  externalNativeBuild {
@@ -1,13 +1,13 @@
1
1
  #pragma once
2
2
 
3
3
  #include "ThreadPool.h"
4
- #include "sqlite3.h"
5
4
  #include "types.h"
6
5
  #include <ReactCommon/CallInvoker.h>
7
6
  #include <jsi/jsi.h>
7
+ #include <set>
8
+ #include <sqlite3.h>
8
9
  #include <unordered_map>
9
10
  #include <vector>
10
- #include <set>
11
11
 
12
12
  namespace opsqlite {
13
13
 
@@ -15,9 +15,9 @@ namespace jsi = facebook::jsi;
15
15
  namespace react = facebook::react;
16
16
 
17
17
  struct PendingReactiveInvocation {
18
- std::string db_name;
19
- std::string table;
20
- std::string rowid;
18
+ std::string db_name;
19
+ std::string table;
20
+ std::string rowid;
21
21
  };
22
22
 
23
23
  struct TableRowDiscriminator {
@@ -61,7 +61,7 @@ public:
61
61
  ~DBHostObject();
62
62
 
63
63
  private:
64
- std::set<std::shared_ptr<ReactiveQuery>> pending_reactive_queries;
64
+ std::set<std::shared_ptr<ReactiveQuery>> pending_reactive_queries;
65
65
  void auto_register_update_hook();
66
66
  void create_jsi_functions();
67
67
  void flush_pending_reactive_queries(std::shared_ptr<jsi::Value> resolve);
@@ -102,7 +102,7 @@ PreparedStatementHostObject::~PreparedStatementHostObject() {
102
102
  }
103
103
  #else
104
104
  if (_stmt != nullptr) {
105
- sqlite3_finalize(_stmt);
105
+ // sqlite3_finalize(_stmt);
106
106
  _stmt = nullptr;
107
107
  }
108
108
  #endif
package/cpp/bridge.cpp CHANGED
@@ -93,8 +93,10 @@ BridgeResult opsqlite_open(std::string const &name,
93
93
  opsqlite_execute(name, "PRAGMA key = '" + encryptionKey + "'", nullptr);
94
94
  #endif
95
95
 
96
+ #ifndef OP_SQLITE_USE_PHONE_VERSION
96
97
  sqlite3_enable_load_extension(db, 1);
97
-
98
+ #endif
99
+
98
100
  char *errMsg;
99
101
 
100
102
  #ifdef OP_SQLITE_USE_CRSQLITE
package/cpp/bridge.h CHANGED
@@ -3,9 +3,9 @@
3
3
 
4
4
  #include "DumbHostObject.h"
5
5
  #include "SmartHostObject.h"
6
- #include "sqlite3.h"
7
6
  #include "types.h"
8
7
  #include "utils.h"
8
+ #include <sqlite3.h>
9
9
  #include <vector>
10
10
 
11
11
  namespace opsqlite {
@@ -65,13 +65,13 @@ BridgeResult opsqlite_execute_raw(std::string const &dbName,
65
65
  void opsqlite_close_all();
66
66
 
67
67
  BridgeResult opsqlite_register_update_hook(std::string const &dbName,
68
- const UpdateCallback& callback);
68
+ const UpdateCallback &callback);
69
69
  BridgeResult opsqlite_deregister_update_hook(std::string const &dbName);
70
70
  BridgeResult opsqlite_register_commit_hook(std::string const &dbName,
71
- const CommitCallback& callback);
71
+ const CommitCallback &callback);
72
72
  BridgeResult opsqlite_deregister_commit_hook(std::string const &dbName);
73
73
  BridgeResult opsqlite_register_rollback_hook(std::string const &dbName,
74
- const RollbackCallback& callback);
74
+ const RollbackCallback &callback);
75
75
  BridgeResult opsqlite_deregister_rollback_hook(std::string const &dbName);
76
76
 
77
77
  sqlite3_stmt *opsqlite_prepare_statement(std::string const &dbName,
@@ -12,7 +12,7 @@ def generate_tokenizers_header_file(names, file_path)
12
12
  file.puts
13
13
  file.puts "#define TOKENIZER_LIST #{tokenizer_list}"
14
14
  file.puts
15
- file.puts "#include \"sqlite3.h\""
15
+ file.puts "#include <sqlite3.h>"
16
16
  file.puts
17
17
  file.puts "namespace opsqlite {"
18
18
  file.puts
package/op-sqlite.podspec CHANGED
@@ -105,18 +105,20 @@ Pod::Spec.new do |s|
105
105
  }
106
106
 
107
107
  log_message.call("[OP-SQLITE] Configuration:")
108
+
109
+ exclude_files = []
108
110
 
109
111
  if use_sqlcipher then
110
112
  log_message.call("[OP-SQLITE] using SQLCipher 🔒")
111
- s.exclude_files = "cpp/sqlite3.c", "cpp/sqlite3.h", "cpp/libsql/bridge.c", "cpp/libsql/bridge.h", "cpp/libsql/bridge.cpp", "cpp/libsql/libsql.h"
113
+ exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h", "cpp/libsql/bridge.c", "cpp/libsql/bridge.h", "cpp/libsql/bridge.cpp", "cpp/libsql/libsql.h"]
112
114
  xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_SQLCIPHER=1 HAVE_FULLFSYNC=1 SQLITE_HAS_CODEC SQLITE_TEMP_STORE=2"
113
115
  s.dependency "OpenSSL-Universal"
114
116
  elsif use_libsql then
115
117
  log_message.call("[OP-SQLITE] using libsql 📘")
116
- s.exclude_files = "cpp/sqlite3.c", "cpp/sqlite3.h", "cpp/sqlcipher/sqlite3.c", "cpp/sqlcipher/sqlite3.h", "cpp/bridge.h", "cpp/bridge.cpp"
118
+ exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h", "cpp/sqlcipher/sqlite3.c", "cpp/sqlcipher/sqlite3.h", "cpp/bridge.h", "cpp/bridge.cpp"]
117
119
  else
118
120
  log_message.call("[OP-SQLITE] using vanilla SQLite 📦")
119
- s.exclude_files = "cpp/sqlcipher/sqlite3.c", "cpp/sqlcipher/sqlite3.h", "cpp/libsql/bridge.c", "cpp/libsql/bridge.h", "cpp/libsql/bridge.cpp", "cpp/libsql/libsql.h"
121
+ exclude_files += ["cpp/sqlcipher/sqlite3.c", "cpp/sqlcipher/sqlite3.h", "cpp/libsql/bridge.c", "cpp/libsql/bridge.h", "cpp/libsql/bridge.cpp", "cpp/libsql/libsql.h"]
120
122
  end
121
123
 
122
124
  s.dependency "React-callinvoker"
@@ -144,7 +146,7 @@ Pod::Spec.new do |s|
144
146
  if phone_version then
145
147
  log_message.call("[OP-SQLITE] using iOS embedded SQLite 📱")
146
148
  xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_PHONE_VERSION=1"
147
- s.exclude_files = "cpp/sqlite3.c", "cpp/sqlite3.h"
149
+ exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h"]
148
150
  s.library = "sqlite3"
149
151
  end
150
152
 
@@ -191,4 +193,5 @@ Pod::Spec.new do |s|
191
193
  xcconfig[:OTHER_CFLAGS] = other_cflags
192
194
  s.pod_target_xcconfig = xcconfig
193
195
  s.vendored_frameworks = frameworks
196
+ s.exclude_files = exclude_files
194
197
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@op-engineering/op-sqlite",
3
- "version": "11.2.3",
3
+ "version": "11.2.5",
4
4
  "description": "Next generation SQLite for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -49,7 +49,7 @@
49
49
  "clang-format": "^1.8.0",
50
50
  "lefthook": "^1.5.5",
51
51
  "react": "18.3.1",
52
- "react-native": "0.76.1",
52
+ "react-native": "0.76.5",
53
53
  "react-native-builder-bob": "^0.23.2",
54
54
  "turbo": "^1.12.4",
55
55
  "typescript": "5.0.4"