@op-engineering/op-sqlite 10.1.0 → 11.0.2
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/README.md +7 -6
- package/android/build.gradle +5 -12
- package/android/jniLibs/arm64-v8a/libsql_experimental.a +0 -0
- package/android/jniLibs/armeabi-v7a/libsql_experimental.a +0 -0
- package/android/jniLibs/x86/libsql_experimental.a +0 -0
- package/android/jniLibs/x86_64/libsql_experimental.a +0 -0
- package/cpp/libsql/libsql.h +2 -0
- package/ios/libsql.xcframework/ios-arm64/Headers/libsql.h +2 -0
- package/ios/libsql.xcframework/ios-arm64/libsql_experimental.a +0 -0
- package/ios/libsql.xcframework/ios-arm64_x86_64-simulator/Headers/libsql.h +2 -0
- package/ios/libsql.xcframework/ios-arm64_x86_64-simulator/libsql_experimental.a +0 -0
- package/op-sqlite.podspec +6 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,22 +4,23 @@ Created by [@ospfranco](https://twitter.com/ospfranco). **Please consider sponso
|
|
|
4
4
|
|
|
5
5
|
OP-SQLite has grown large to cover a lot of plugins, sqlite versions and APIs. Please read the full documentation before opening an issue.
|
|
6
6
|
|
|
7
|
-
[
|
|
7
|
+
[Open the docs](https://ospfranco.notion.site/OP-SQLite-Documentation-a279a52102464d0cb13c3fa230d2f2dc?pvs=4)
|
|
8
8
|
|
|
9
9
|
Join the Discord:
|
|
10
10
|
|
|
11
11
|
https://discord.gg/W9XmqCQCKP
|
|
12
12
|
|
|
13
|
-
Some of the big
|
|
13
|
+
Some of the big supported features:
|
|
14
14
|
|
|
15
|
-
- Vanilla sqlite
|
|
16
|
-
- Libsql is supported as a
|
|
17
|
-
- SQLCipher is supported as a
|
|
15
|
+
- Vanilla sqlite
|
|
16
|
+
- Libsql is supported as a compilation target
|
|
17
|
+
- SQLCipher is supported as a compilation target
|
|
18
18
|
- FTS5 plugin
|
|
19
19
|
- Rtree plugin
|
|
20
20
|
- cr-sqlite plugin
|
|
21
21
|
- sqlite-vec plugin
|
|
22
|
-
- Reactive queries
|
|
22
|
+
- Reactive queries
|
|
23
|
+
- Custom tokenizers
|
|
23
24
|
|
|
24
25
|
# License
|
|
25
26
|
|
package/android/build.gradle
CHANGED
|
@@ -30,7 +30,7 @@ def isNewArchitectureEnabled() {
|
|
|
30
30
|
def useSQLCipher = false
|
|
31
31
|
def useLibsql = false
|
|
32
32
|
def useCRSQLite = false
|
|
33
|
-
def performanceMode =
|
|
33
|
+
def performanceMode = false
|
|
34
34
|
def sqliteFlags = ""
|
|
35
35
|
def enableFTS5 = false
|
|
36
36
|
def useSqliteVec = false
|
|
@@ -53,7 +53,7 @@ if(opsqliteConfig) {
|
|
|
53
53
|
useSQLCipher = opsqliteConfig["sqlcipher"]
|
|
54
54
|
useCRSQLite = opsqliteConfig["crsqlite"]
|
|
55
55
|
useSqliteVec = opsqliteConfig["sqliteVec"]
|
|
56
|
-
performanceMode = opsqliteConfig["performanceMode"]
|
|
56
|
+
performanceMode = opsqliteConfig["performanceMode"]
|
|
57
57
|
sqliteFlags = opsqliteConfig["sqliteFlags"] ? opsqliteConfig["sqliteFlags"] : ""
|
|
58
58
|
enableFTS5 = opsqliteConfig["fts5"]
|
|
59
59
|
useLibsql = opsqliteConfig["libsql"]
|
|
@@ -73,12 +73,8 @@ if(useCRSQLite) {
|
|
|
73
73
|
println "[OP-SQLITE] using CR-SQLite 🤖"
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
if(performanceMode
|
|
77
|
-
println "[OP-SQLITE]
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if(performanceMode == "2") {
|
|
81
|
-
println "[OP-SQLITE] Thread safe performance mode enabled! 🚀"
|
|
76
|
+
if(performanceMode) {
|
|
77
|
+
println "[OP-SQLITE] Performance mode enabled! 🚀"
|
|
82
78
|
}
|
|
83
79
|
|
|
84
80
|
if(enableFTS5) {
|
|
@@ -151,10 +147,7 @@ android {
|
|
|
151
147
|
cFlags += "-DOP_SQLITE_USE_CRSQLITE=1"
|
|
152
148
|
cppFlags += "-DOP_SQLITE_USE_CRSQLITE=1"
|
|
153
149
|
}
|
|
154
|
-
if(performanceMode
|
|
155
|
-
cFlags += ["-DSQLITE_DQS=0", "-DSQLITE_THREADSAFE=0", "-DSQLITE_DEFAULT_MEMSTATUS=0", "-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1", "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1", "-DSQLITE_MAX_EXPR_DEPTH=0", "-DSQLITE_OMIT_DEPRECATED=1", "-DSQLITE_OMIT_PROGRESS_CALLBACK=1", "-DSQLITE_OMIT_SHARED_CACHE=1", "-DSQLITE_USE_ALLOCA=1"]
|
|
156
|
-
}
|
|
157
|
-
if(performanceMode == '2') {
|
|
150
|
+
if(performanceMode) {
|
|
158
151
|
cFlags += ["-DSQLITE_DQS=0", "-DSQLITE_THREADSAFE=1", "-DSQLITE_DEFAULT_MEMSTATUS=0", "-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1", "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1", "-DSQLITE_MAX_EXPR_DEPTH=0", "-DSQLITE_OMIT_DEPRECATED=1", "-DSQLITE_OMIT_PROGRESS_CALLBACK=1", "-DSQLITE_OMIT_SHARED_CACHE=1", "-DSQLITE_USE_ALLOCA=1"]
|
|
159
152
|
}
|
|
160
153
|
if(enableFTS5) {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp/libsql/libsql.h
CHANGED
|
@@ -61,6 +61,8 @@ typedef struct {
|
|
|
61
61
|
extern "C" {
|
|
62
62
|
#endif // __cplusplus
|
|
63
63
|
|
|
64
|
+
int libsql_enable_internal_tracing(void);
|
|
65
|
+
|
|
64
66
|
int libsql_sync(libsql_database_t db, const char **out_err_msg);
|
|
65
67
|
|
|
66
68
|
int libsql_sync2(libsql_database_t db, replicated *out_replicated, const char **out_err_msg);
|
|
@@ -61,6 +61,8 @@ typedef struct {
|
|
|
61
61
|
extern "C" {
|
|
62
62
|
#endif // __cplusplus
|
|
63
63
|
|
|
64
|
+
int libsql_enable_internal_tracing(void);
|
|
65
|
+
|
|
64
66
|
int libsql_sync(libsql_database_t db, const char **out_err_msg);
|
|
65
67
|
|
|
66
68
|
int libsql_sync2(libsql_database_t db, replicated *out_replicated, const char **out_err_msg);
|
|
Binary file
|
|
@@ -61,6 +61,8 @@ typedef struct {
|
|
|
61
61
|
extern "C" {
|
|
62
62
|
#endif // __cplusplus
|
|
63
63
|
|
|
64
|
+
int libsql_enable_internal_tracing(void);
|
|
65
|
+
|
|
64
66
|
int libsql_sync(libsql_database_t db, const char **out_err_msg);
|
|
65
67
|
|
|
66
68
|
int libsql_sync2(libsql_database_t db, replicated *out_replicated, const char **out_err_msg);
|
|
Binary file
|
package/op-sqlite.podspec
CHANGED
|
@@ -24,7 +24,7 @@ op_sqlite_config = app_package["op-sqlite"]
|
|
|
24
24
|
use_sqlcipher = false
|
|
25
25
|
use_crsqlite = false
|
|
26
26
|
use_libsql = false
|
|
27
|
-
performance_mode =
|
|
27
|
+
performance_mode = false
|
|
28
28
|
phone_version = false
|
|
29
29
|
sqlite_flags = ""
|
|
30
30
|
fts5 = false
|
|
@@ -36,7 +36,7 @@ if(op_sqlite_config != nil)
|
|
|
36
36
|
use_sqlcipher = op_sqlite_config["sqlcipher"] == true
|
|
37
37
|
use_crsqlite = op_sqlite_config["crsqlite"] == true
|
|
38
38
|
use_libsql = op_sqlite_config["libsql"] == true
|
|
39
|
-
performance_mode = op_sqlite_config["performanceMode"] ||
|
|
39
|
+
performance_mode = op_sqlite_config["performanceMode"] || false
|
|
40
40
|
phone_version = op_sqlite_config["iosSqlite"] == true
|
|
41
41
|
sqlite_flags = op_sqlite_config["sqliteFlags"] || ""
|
|
42
42
|
fts5 = op_sqlite_config["fts5"] == true
|
|
@@ -136,7 +136,7 @@ Pod::Spec.new do |s|
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
other_cflags = '-DSQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION=1'
|
|
139
|
-
optimizedCflags =
|
|
139
|
+
optimizedCflags = '$(inherited) -DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_SHARED_CACHE=1 -DSQLITE_USE_ALLOCA=1 -DSQLITE_THREADSAFE=1'
|
|
140
140
|
frameworks = []
|
|
141
141
|
|
|
142
142
|
if fts5 then
|
|
@@ -156,14 +156,9 @@ Pod::Spec.new do |s|
|
|
|
156
156
|
s.library = "sqlite3"
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
-
if performance_mode
|
|
160
|
-
log_message.call("[OP-SQLITE]
|
|
161
|
-
other_cflags
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
if performance_mode == '2' then
|
|
165
|
-
log_message.call("[OP-SQLITE] Thread safe (2) performance mode enabled 🚀")
|
|
166
|
-
other_cflags = optimizedCflags + ' -DSQLITE_THREADSAFE=1 '
|
|
159
|
+
if performance_mode then
|
|
160
|
+
log_message.call("[OP-SQLITE] Performance mode enabled, some features might be disabled 🚀")
|
|
161
|
+
other_cflags += optimizedCflags
|
|
167
162
|
end
|
|
168
163
|
|
|
169
164
|
if use_crsqlite then
|