@sqliteai/sqlite-sync-expo 0.9.83 → 1.0.0
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 +1 -1
- package/android/jniLibs/arm64-v8a/cloudsync.so +0 -0
- package/android/jniLibs/armeabi-v7a/cloudsync.so +0 -0
- package/android/jniLibs/x86_64/cloudsync.so +0 -0
- package/ios/CloudSync.xcframework/Info.plist +8 -8
- package/ios/CloudSync.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/CloudSync.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/CloudSync.xcframework/_CodeSignature/CodeResources +36 -36
- package/ios/CloudSync.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/CloudSync +0 -0
- package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/Headers/CloudSync.h +30 -15
- package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/Info.plist +1 -1
- package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/_CodeSignature/CodeResources +3 -3
- package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/CloudSync +0 -0
- package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/Headers/CloudSync.h +30 -15
- package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/Info.plist +1 -1
- package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/_CodeSignature/CodeResources +3 -3
- package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/CloudSync +0 -0
- package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h +30 -15
- package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Info.plist +1 -1
- package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/_CodeSignature/CodeResources +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -8,22 +8,21 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>CloudSync.framework/CloudSync</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>CloudSync.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
-
<string>x86_64</string>
|
|
18
17
|
</array>
|
|
19
18
|
<key>SupportedPlatform</key>
|
|
20
|
-
<string>
|
|
19
|
+
<string>ios</string>
|
|
21
20
|
</dict>
|
|
22
21
|
<dict>
|
|
23
22
|
<key>BinaryPath</key>
|
|
24
23
|
<string>CloudSync.framework/CloudSync</string>
|
|
25
24
|
<key>LibraryIdentifier</key>
|
|
26
|
-
<string>
|
|
25
|
+
<string>macos-arm64_x86_64</string>
|
|
27
26
|
<key>LibraryPath</key>
|
|
28
27
|
<string>CloudSync.framework</string>
|
|
29
28
|
<key>SupportedArchitectures</key>
|
|
@@ -32,23 +31,24 @@
|
|
|
32
31
|
<string>x86_64</string>
|
|
33
32
|
</array>
|
|
34
33
|
<key>SupportedPlatform</key>
|
|
35
|
-
<string>
|
|
36
|
-
<key>SupportedPlatformVariant</key>
|
|
37
|
-
<string>simulator</string>
|
|
34
|
+
<string>macos</string>
|
|
38
35
|
</dict>
|
|
39
36
|
<dict>
|
|
40
37
|
<key>BinaryPath</key>
|
|
41
38
|
<string>CloudSync.framework/CloudSync</string>
|
|
42
39
|
<key>LibraryIdentifier</key>
|
|
43
|
-
<string>ios-
|
|
40
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
44
41
|
<key>LibraryPath</key>
|
|
45
42
|
<string>CloudSync.framework</string>
|
|
46
43
|
<key>SupportedArchitectures</key>
|
|
47
44
|
<array>
|
|
48
45
|
<string>arm64</string>
|
|
46
|
+
<string>x86_64</string>
|
|
49
47
|
</array>
|
|
50
48
|
<key>SupportedPlatform</key>
|
|
51
49
|
<string>ios</string>
|
|
50
|
+
<key>SupportedPlatformVariant</key>
|
|
51
|
+
<string>simulator</string>
|
|
52
52
|
</dict>
|
|
53
53
|
</array>
|
|
54
54
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>ios-arm64/CloudSync.framework/CloudSync</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
q5ZXQGgR6J6ChKleZM7XuKbC78s=
|
|
10
10
|
</data>
|
|
11
11
|
<key>ios-arm64/CloudSync.framework/Headers/CloudSync.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
14
14
|
</data>
|
|
15
15
|
<key>ios-arm64/CloudSync.framework/Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
18
18
|
</data>
|
|
19
19
|
<key>ios-arm64/CloudSync.framework/Modules/module.modulemap</key>
|
|
20
20
|
<data>
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>ios-arm64/CloudSync.framework/_CodeSignature/CodeResources</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
Bll65gIdzqCXIbyXGXatX5piehs=
|
|
26
26
|
</data>
|
|
27
27
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/CloudSync</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
JbXqj7dQM1oDPy1RgrcCBQcArrM=
|
|
30
30
|
</data>
|
|
31
31
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/Headers/CloudSync.h</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
34
34
|
</data>
|
|
35
35
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/Info.plist</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
38
38
|
</data>
|
|
39
39
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/Modules/module.modulemap</key>
|
|
40
40
|
<data>
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
</data>
|
|
43
43
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/_CodeSignature/CodeResources</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
Bll65gIdzqCXIbyXGXatX5piehs=
|
|
46
46
|
</data>
|
|
47
47
|
<key>macos-arm64_x86_64/CloudSync.framework/CloudSync</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
R8dwwiDfopk/jdtvZFonCTFRedQ=
|
|
50
50
|
</data>
|
|
51
51
|
<key>macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
54
54
|
</data>
|
|
55
55
|
<key>macos-arm64_x86_64/CloudSync.framework/Info.plist</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
58
58
|
</data>
|
|
59
59
|
<key>macos-arm64_x86_64/CloudSync.framework/Modules/module.modulemap</key>
|
|
60
60
|
<data>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</data>
|
|
63
63
|
<key>macos-arm64_x86_64/CloudSync.framework/_CodeSignature/CodeResources</key>
|
|
64
64
|
<data>
|
|
65
|
-
|
|
65
|
+
Bll65gIdzqCXIbyXGXatX5piehs=
|
|
66
66
|
</data>
|
|
67
67
|
</dict>
|
|
68
68
|
<key>files2</key>
|
|
@@ -71,33 +71,33 @@
|
|
|
71
71
|
<dict>
|
|
72
72
|
<key>hash</key>
|
|
73
73
|
<data>
|
|
74
|
-
|
|
74
|
+
q5ZXQGgR6J6ChKleZM7XuKbC78s=
|
|
75
75
|
</data>
|
|
76
76
|
<key>hash2</key>
|
|
77
77
|
<data>
|
|
78
|
-
|
|
78
|
+
eE3Ci0TO41UgqA3zJSsHSQjY99H9pzm4PsVAURfongY=
|
|
79
79
|
</data>
|
|
80
80
|
</dict>
|
|
81
81
|
<key>ios-arm64/CloudSync.framework/Headers/CloudSync.h</key>
|
|
82
82
|
<dict>
|
|
83
83
|
<key>hash</key>
|
|
84
84
|
<data>
|
|
85
|
-
|
|
85
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
86
86
|
</data>
|
|
87
87
|
<key>hash2</key>
|
|
88
88
|
<data>
|
|
89
|
-
|
|
89
|
+
LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
|
|
90
90
|
</data>
|
|
91
91
|
</dict>
|
|
92
92
|
<key>ios-arm64/CloudSync.framework/Info.plist</key>
|
|
93
93
|
<dict>
|
|
94
94
|
<key>hash</key>
|
|
95
95
|
<data>
|
|
96
|
-
|
|
96
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
97
97
|
</data>
|
|
98
98
|
<key>hash2</key>
|
|
99
99
|
<data>
|
|
100
|
-
|
|
100
|
+
hNvDddt4wn7ToXMhkxxCLsOSw9OwjpRHYL+80x0dcZw=
|
|
101
101
|
</data>
|
|
102
102
|
</dict>
|
|
103
103
|
<key>ios-arm64/CloudSync.framework/Modules/module.modulemap</key>
|
|
@@ -115,44 +115,44 @@
|
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
Bll65gIdzqCXIbyXGXatX5piehs=
|
|
119
119
|
</data>
|
|
120
120
|
<key>hash2</key>
|
|
121
121
|
<data>
|
|
122
|
-
|
|
122
|
+
g40GMRnd7lx2ZKTWQ5yiJaRgNJdHdeLY6vBGx/VplJE=
|
|
123
123
|
</data>
|
|
124
124
|
</dict>
|
|
125
125
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/CloudSync</key>
|
|
126
126
|
<dict>
|
|
127
127
|
<key>hash</key>
|
|
128
128
|
<data>
|
|
129
|
-
|
|
129
|
+
JbXqj7dQM1oDPy1RgrcCBQcArrM=
|
|
130
130
|
</data>
|
|
131
131
|
<key>hash2</key>
|
|
132
132
|
<data>
|
|
133
|
-
|
|
133
|
+
mk7Wpl0ekG5d3BrEkPRB1ag1yodxkScCyPOPSuq4TgI=
|
|
134
134
|
</data>
|
|
135
135
|
</dict>
|
|
136
136
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/Headers/CloudSync.h</key>
|
|
137
137
|
<dict>
|
|
138
138
|
<key>hash</key>
|
|
139
139
|
<data>
|
|
140
|
-
|
|
140
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
141
141
|
</data>
|
|
142
142
|
<key>hash2</key>
|
|
143
143
|
<data>
|
|
144
|
-
|
|
144
|
+
LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
|
|
145
145
|
</data>
|
|
146
146
|
</dict>
|
|
147
147
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/Info.plist</key>
|
|
148
148
|
<dict>
|
|
149
149
|
<key>hash</key>
|
|
150
150
|
<data>
|
|
151
|
-
|
|
151
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
152
152
|
</data>
|
|
153
153
|
<key>hash2</key>
|
|
154
154
|
<data>
|
|
155
|
-
|
|
155
|
+
hNvDddt4wn7ToXMhkxxCLsOSw9OwjpRHYL+80x0dcZw=
|
|
156
156
|
</data>
|
|
157
157
|
</dict>
|
|
158
158
|
<key>ios-arm64_x86_64-simulator/CloudSync.framework/Modules/module.modulemap</key>
|
|
@@ -170,44 +170,44 @@
|
|
|
170
170
|
<dict>
|
|
171
171
|
<key>hash</key>
|
|
172
172
|
<data>
|
|
173
|
-
|
|
173
|
+
Bll65gIdzqCXIbyXGXatX5piehs=
|
|
174
174
|
</data>
|
|
175
175
|
<key>hash2</key>
|
|
176
176
|
<data>
|
|
177
|
-
|
|
177
|
+
g40GMRnd7lx2ZKTWQ5yiJaRgNJdHdeLY6vBGx/VplJE=
|
|
178
178
|
</data>
|
|
179
179
|
</dict>
|
|
180
180
|
<key>macos-arm64_x86_64/CloudSync.framework/CloudSync</key>
|
|
181
181
|
<dict>
|
|
182
182
|
<key>hash</key>
|
|
183
183
|
<data>
|
|
184
|
-
|
|
184
|
+
R8dwwiDfopk/jdtvZFonCTFRedQ=
|
|
185
185
|
</data>
|
|
186
186
|
<key>hash2</key>
|
|
187
187
|
<data>
|
|
188
|
-
|
|
188
|
+
1+ThEtMZ6ljbGcFkrfAHk7j09Q9O+jIFOsfEHbfAU9Y=
|
|
189
189
|
</data>
|
|
190
190
|
</dict>
|
|
191
191
|
<key>macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h</key>
|
|
192
192
|
<dict>
|
|
193
193
|
<key>hash</key>
|
|
194
194
|
<data>
|
|
195
|
-
|
|
195
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
196
196
|
</data>
|
|
197
197
|
<key>hash2</key>
|
|
198
198
|
<data>
|
|
199
|
-
|
|
199
|
+
LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
|
|
200
200
|
</data>
|
|
201
201
|
</dict>
|
|
202
202
|
<key>macos-arm64_x86_64/CloudSync.framework/Info.plist</key>
|
|
203
203
|
<dict>
|
|
204
204
|
<key>hash</key>
|
|
205
205
|
<data>
|
|
206
|
-
|
|
206
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
207
207
|
</data>
|
|
208
208
|
<key>hash2</key>
|
|
209
209
|
<data>
|
|
210
|
-
|
|
210
|
+
hNvDddt4wn7ToXMhkxxCLsOSw9OwjpRHYL+80x0dcZw=
|
|
211
211
|
</data>
|
|
212
212
|
</dict>
|
|
213
213
|
<key>macos-arm64_x86_64/CloudSync.framework/Modules/module.modulemap</key>
|
|
@@ -225,11 +225,11 @@
|
|
|
225
225
|
<dict>
|
|
226
226
|
<key>hash</key>
|
|
227
227
|
<data>
|
|
228
|
-
|
|
228
|
+
Bll65gIdzqCXIbyXGXatX5piehs=
|
|
229
229
|
</data>
|
|
230
230
|
<key>hash2</key>
|
|
231
231
|
<data>
|
|
232
|
-
|
|
232
|
+
g40GMRnd7lx2ZKTWQ5yiJaRgNJdHdeLY6vBGx/VplJE=
|
|
233
233
|
</data>
|
|
234
234
|
</dict>
|
|
235
235
|
</dict>
|
|
Binary file
|
|
Binary file
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
#include <stddef.h>
|
|
13
13
|
#include <stdbool.h>
|
|
14
14
|
#include "database.h"
|
|
15
|
+
#include "block.h"
|
|
15
16
|
|
|
16
17
|
#ifdef __cplusplus
|
|
17
18
|
extern "C" {
|
|
18
19
|
#endif
|
|
19
20
|
|
|
20
|
-
#define CLOUDSYNC_VERSION "0.
|
|
21
|
+
#define CLOUDSYNC_VERSION "1.0.0"
|
|
21
22
|
#define CLOUDSYNC_MAX_TABLENAME_LEN 512
|
|
22
23
|
|
|
23
24
|
#define CLOUDSYNC_VALUE_NOTSET -1
|
|
@@ -28,12 +29,6 @@ extern "C" {
|
|
|
28
29
|
|
|
29
30
|
#define CLOUDSYNC_CHANGES_NCOLS 9
|
|
30
31
|
|
|
31
|
-
typedef enum {
|
|
32
|
-
CLOUDSYNC_PAYLOAD_APPLY_WILL_APPLY = 1,
|
|
33
|
-
CLOUDSYNC_PAYLOAD_APPLY_DID_APPLY = 2,
|
|
34
|
-
CLOUDSYNC_PAYLOAD_APPLY_CLEANUP = 3
|
|
35
|
-
} CLOUDSYNC_PAYLOAD_APPLY_STEPS;
|
|
36
|
-
|
|
37
32
|
// CRDT Algos
|
|
38
33
|
table_algo cloudsync_algo_from_name (const char *algo_name);
|
|
39
34
|
const char *cloudsync_algo_name (table_algo algo);
|
|
@@ -89,7 +84,7 @@ int cloudsync_payload_encode_step (cloudsync_payload_context *payload, clouds
|
|
|
89
84
|
int cloudsync_payload_encode_final (cloudsync_payload_context *payload, cloudsync_context *data);
|
|
90
85
|
char *cloudsync_payload_blob (cloudsync_payload_context *payload, int64_t *blob_size, int64_t *nrows);
|
|
91
86
|
size_t cloudsync_payload_context_size (size_t *header_size);
|
|
92
|
-
int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version,
|
|
87
|
+
int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version, int64_t *new_db_version);
|
|
93
88
|
int cloudsync_payload_save (cloudsync_context *data, const char *payload_path, int *blob_size); // available only on Desktop OS (no WASM, no mobile)
|
|
94
89
|
|
|
95
90
|
// CloudSync table context
|
|
@@ -109,18 +104,38 @@ const char *table_schema (cloudsync_table_context *table);
|
|
|
109
104
|
int table_remove (cloudsync_context *data, cloudsync_table_context *table);
|
|
110
105
|
void table_free (cloudsync_table_context *table);
|
|
111
106
|
|
|
107
|
+
// Block-level LWW support
|
|
108
|
+
bool table_has_block_cols (cloudsync_table_context *table);
|
|
109
|
+
col_algo_t table_col_algo (cloudsync_table_context *table, int index);
|
|
110
|
+
const char *table_col_delimiter (cloudsync_table_context *table, int index);
|
|
111
|
+
int table_col_index (cloudsync_table_context *table, const char *col_name);
|
|
112
|
+
int block_materialize_column (cloudsync_context *data, cloudsync_table_context *table, const void *pk, int pklen, const char *base_col_name);
|
|
113
|
+
int cloudsync_setup_block_column (cloudsync_context *data, const char *table_name, const char *col_name, const char *delimiter);
|
|
114
|
+
|
|
115
|
+
// Block column accessors (avoids accessing opaque struct from outside cloudsync.c)
|
|
116
|
+
dbvm_t *table_block_value_read_stmt (cloudsync_table_context *table);
|
|
117
|
+
dbvm_t *table_block_value_write_stmt (cloudsync_table_context *table);
|
|
118
|
+
dbvm_t *table_block_list_stmt (cloudsync_table_context *table);
|
|
119
|
+
const char *table_blocks_ref (cloudsync_table_context *table);
|
|
120
|
+
void table_set_col_delimiter (cloudsync_table_context *table, int col_idx, const char *delimiter);
|
|
121
|
+
|
|
112
122
|
// local merge/apply
|
|
113
|
-
int local_mark_insert_sentinel_meta (cloudsync_table_context *table, const
|
|
114
|
-
int local_update_sentinel (cloudsync_table_context *table, const
|
|
115
|
-
int local_mark_insert_or_update_meta (cloudsync_table_context *table, const
|
|
116
|
-
int local_mark_delete_meta (cloudsync_table_context *table, const
|
|
117
|
-
int
|
|
118
|
-
int
|
|
123
|
+
int local_mark_insert_sentinel_meta (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
124
|
+
int local_update_sentinel (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
125
|
+
int local_mark_insert_or_update_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const char *col_name, int64_t db_version, int seq);
|
|
126
|
+
int local_mark_delete_meta (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
127
|
+
int local_mark_delete_block_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const char *block_colname, int64_t db_version, int seq);
|
|
128
|
+
int block_delete_value_external (cloudsync_context *data, cloudsync_table_context *table, const void *pk, size_t pklen, const char *block_colname);
|
|
129
|
+
int local_drop_meta (cloudsync_table_context *table, const void *pk, size_t pklen);
|
|
130
|
+
int local_update_move_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const void *pk2, size_t pklen2, int64_t db_version);
|
|
119
131
|
|
|
120
132
|
// used by changes virtual table
|
|
121
|
-
int merge_insert_col (cloudsync_context *data, cloudsync_table_context *table, const
|
|
133
|
+
int merge_insert_col (cloudsync_context *data, cloudsync_table_context *table, const void *pk, int pklen, const char *col_name, dbvalue_t *col_value, int64_t col_version, int64_t db_version, const char *site_id, int site_len, int64_t seq, int64_t *rowid);
|
|
122
134
|
int merge_insert (cloudsync_context *data, cloudsync_table_context *table, const char *insert_pk, int insert_pk_len, int64_t insert_cl, const char *insert_name, dbvalue_t *insert_value, int64_t insert_col_version, int64_t insert_db_version, const char *insert_site_id, int insert_site_id_len, int64_t insert_seq, int64_t *rowid);
|
|
123
135
|
|
|
136
|
+
// filter rewrite
|
|
137
|
+
char *cloudsync_filter_add_row_prefix(const char *filter, const char *prefix, char **columns, int ncols);
|
|
138
|
+
|
|
124
139
|
// decode bind context
|
|
125
140
|
char *cloudsync_pk_context_tbl (cloudsync_pk_decode_bind_context *ctx, int64_t *tbl_len);
|
|
126
141
|
void *cloudsync_pk_context_pk (cloudsync_pk_decode_bind_context *ctx, int64_t *pk_len);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>CloudSync</string> <key>CFBundleIdentifier</key> <string>ai.sqlite.cloudsync</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>0.
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>CloudSync</string> <key>CFBundleIdentifier</key> <string>ai.sqlite.cloudsync</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
|
package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/_CodeSignature/CodeResources
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/CloudSync.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/module.modulemap</key>
|
|
16
16
|
<data>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<dict>
|
|
24
24
|
<key>hash2</key>
|
|
25
25
|
<data>
|
|
26
|
-
|
|
26
|
+
LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
|
|
27
27
|
</data>
|
|
28
28
|
</dict>
|
|
29
29
|
<key>Modules/module.modulemap</key>
|
|
Binary file
|
package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/Headers/CloudSync.h
CHANGED
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
#include <stddef.h>
|
|
13
13
|
#include <stdbool.h>
|
|
14
14
|
#include "database.h"
|
|
15
|
+
#include "block.h"
|
|
15
16
|
|
|
16
17
|
#ifdef __cplusplus
|
|
17
18
|
extern "C" {
|
|
18
19
|
#endif
|
|
19
20
|
|
|
20
|
-
#define CLOUDSYNC_VERSION "0.
|
|
21
|
+
#define CLOUDSYNC_VERSION "1.0.0"
|
|
21
22
|
#define CLOUDSYNC_MAX_TABLENAME_LEN 512
|
|
22
23
|
|
|
23
24
|
#define CLOUDSYNC_VALUE_NOTSET -1
|
|
@@ -28,12 +29,6 @@ extern "C" {
|
|
|
28
29
|
|
|
29
30
|
#define CLOUDSYNC_CHANGES_NCOLS 9
|
|
30
31
|
|
|
31
|
-
typedef enum {
|
|
32
|
-
CLOUDSYNC_PAYLOAD_APPLY_WILL_APPLY = 1,
|
|
33
|
-
CLOUDSYNC_PAYLOAD_APPLY_DID_APPLY = 2,
|
|
34
|
-
CLOUDSYNC_PAYLOAD_APPLY_CLEANUP = 3
|
|
35
|
-
} CLOUDSYNC_PAYLOAD_APPLY_STEPS;
|
|
36
|
-
|
|
37
32
|
// CRDT Algos
|
|
38
33
|
table_algo cloudsync_algo_from_name (const char *algo_name);
|
|
39
34
|
const char *cloudsync_algo_name (table_algo algo);
|
|
@@ -89,7 +84,7 @@ int cloudsync_payload_encode_step (cloudsync_payload_context *payload, clouds
|
|
|
89
84
|
int cloudsync_payload_encode_final (cloudsync_payload_context *payload, cloudsync_context *data);
|
|
90
85
|
char *cloudsync_payload_blob (cloudsync_payload_context *payload, int64_t *blob_size, int64_t *nrows);
|
|
91
86
|
size_t cloudsync_payload_context_size (size_t *header_size);
|
|
92
|
-
int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version,
|
|
87
|
+
int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version, int64_t *new_db_version);
|
|
93
88
|
int cloudsync_payload_save (cloudsync_context *data, const char *payload_path, int *blob_size); // available only on Desktop OS (no WASM, no mobile)
|
|
94
89
|
|
|
95
90
|
// CloudSync table context
|
|
@@ -109,18 +104,38 @@ const char *table_schema (cloudsync_table_context *table);
|
|
|
109
104
|
int table_remove (cloudsync_context *data, cloudsync_table_context *table);
|
|
110
105
|
void table_free (cloudsync_table_context *table);
|
|
111
106
|
|
|
107
|
+
// Block-level LWW support
|
|
108
|
+
bool table_has_block_cols (cloudsync_table_context *table);
|
|
109
|
+
col_algo_t table_col_algo (cloudsync_table_context *table, int index);
|
|
110
|
+
const char *table_col_delimiter (cloudsync_table_context *table, int index);
|
|
111
|
+
int table_col_index (cloudsync_table_context *table, const char *col_name);
|
|
112
|
+
int block_materialize_column (cloudsync_context *data, cloudsync_table_context *table, const void *pk, int pklen, const char *base_col_name);
|
|
113
|
+
int cloudsync_setup_block_column (cloudsync_context *data, const char *table_name, const char *col_name, const char *delimiter);
|
|
114
|
+
|
|
115
|
+
// Block column accessors (avoids accessing opaque struct from outside cloudsync.c)
|
|
116
|
+
dbvm_t *table_block_value_read_stmt (cloudsync_table_context *table);
|
|
117
|
+
dbvm_t *table_block_value_write_stmt (cloudsync_table_context *table);
|
|
118
|
+
dbvm_t *table_block_list_stmt (cloudsync_table_context *table);
|
|
119
|
+
const char *table_blocks_ref (cloudsync_table_context *table);
|
|
120
|
+
void table_set_col_delimiter (cloudsync_table_context *table, int col_idx, const char *delimiter);
|
|
121
|
+
|
|
112
122
|
// local merge/apply
|
|
113
|
-
int local_mark_insert_sentinel_meta (cloudsync_table_context *table, const
|
|
114
|
-
int local_update_sentinel (cloudsync_table_context *table, const
|
|
115
|
-
int local_mark_insert_or_update_meta (cloudsync_table_context *table, const
|
|
116
|
-
int local_mark_delete_meta (cloudsync_table_context *table, const
|
|
117
|
-
int
|
|
118
|
-
int
|
|
123
|
+
int local_mark_insert_sentinel_meta (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
124
|
+
int local_update_sentinel (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
125
|
+
int local_mark_insert_or_update_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const char *col_name, int64_t db_version, int seq);
|
|
126
|
+
int local_mark_delete_meta (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
127
|
+
int local_mark_delete_block_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const char *block_colname, int64_t db_version, int seq);
|
|
128
|
+
int block_delete_value_external (cloudsync_context *data, cloudsync_table_context *table, const void *pk, size_t pklen, const char *block_colname);
|
|
129
|
+
int local_drop_meta (cloudsync_table_context *table, const void *pk, size_t pklen);
|
|
130
|
+
int local_update_move_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const void *pk2, size_t pklen2, int64_t db_version);
|
|
119
131
|
|
|
120
132
|
// used by changes virtual table
|
|
121
|
-
int merge_insert_col (cloudsync_context *data, cloudsync_table_context *table, const
|
|
133
|
+
int merge_insert_col (cloudsync_context *data, cloudsync_table_context *table, const void *pk, int pklen, const char *col_name, dbvalue_t *col_value, int64_t col_version, int64_t db_version, const char *site_id, int site_len, int64_t seq, int64_t *rowid);
|
|
122
134
|
int merge_insert (cloudsync_context *data, cloudsync_table_context *table, const char *insert_pk, int insert_pk_len, int64_t insert_cl, const char *insert_name, dbvalue_t *insert_value, int64_t insert_col_version, int64_t insert_db_version, const char *insert_site_id, int insert_site_id_len, int64_t insert_seq, int64_t *rowid);
|
|
123
135
|
|
|
136
|
+
// filter rewrite
|
|
137
|
+
char *cloudsync_filter_add_row_prefix(const char *filter, const char *prefix, char **columns, int ncols);
|
|
138
|
+
|
|
124
139
|
// decode bind context
|
|
125
140
|
char *cloudsync_pk_context_tbl (cloudsync_pk_decode_bind_context *ctx, int64_t *tbl_len);
|
|
126
141
|
void *cloudsync_pk_context_pk (cloudsync_pk_decode_bind_context *ctx, int64_t *pk_len);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>CloudSync</string> <key>CFBundleIdentifier</key> <string>ai.sqlite.cloudsync</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>0.
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>CloudSync</string> <key>CFBundleIdentifier</key> <string>ai.sqlite.cloudsync</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/CloudSync.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/module.modulemap</key>
|
|
16
16
|
<data>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<dict>
|
|
24
24
|
<key>hash2</key>
|
|
25
25
|
<data>
|
|
26
|
-
|
|
26
|
+
LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
|
|
27
27
|
</data>
|
|
28
28
|
</dict>
|
|
29
29
|
<key>Modules/module.modulemap</key>
|
|
Binary file
|
package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h
CHANGED
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
#include <stddef.h>
|
|
13
13
|
#include <stdbool.h>
|
|
14
14
|
#include "database.h"
|
|
15
|
+
#include "block.h"
|
|
15
16
|
|
|
16
17
|
#ifdef __cplusplus
|
|
17
18
|
extern "C" {
|
|
18
19
|
#endif
|
|
19
20
|
|
|
20
|
-
#define CLOUDSYNC_VERSION "0.
|
|
21
|
+
#define CLOUDSYNC_VERSION "1.0.0"
|
|
21
22
|
#define CLOUDSYNC_MAX_TABLENAME_LEN 512
|
|
22
23
|
|
|
23
24
|
#define CLOUDSYNC_VALUE_NOTSET -1
|
|
@@ -28,12 +29,6 @@ extern "C" {
|
|
|
28
29
|
|
|
29
30
|
#define CLOUDSYNC_CHANGES_NCOLS 9
|
|
30
31
|
|
|
31
|
-
typedef enum {
|
|
32
|
-
CLOUDSYNC_PAYLOAD_APPLY_WILL_APPLY = 1,
|
|
33
|
-
CLOUDSYNC_PAYLOAD_APPLY_DID_APPLY = 2,
|
|
34
|
-
CLOUDSYNC_PAYLOAD_APPLY_CLEANUP = 3
|
|
35
|
-
} CLOUDSYNC_PAYLOAD_APPLY_STEPS;
|
|
36
|
-
|
|
37
32
|
// CRDT Algos
|
|
38
33
|
table_algo cloudsync_algo_from_name (const char *algo_name);
|
|
39
34
|
const char *cloudsync_algo_name (table_algo algo);
|
|
@@ -89,7 +84,7 @@ int cloudsync_payload_encode_step (cloudsync_payload_context *payload, clouds
|
|
|
89
84
|
int cloudsync_payload_encode_final (cloudsync_payload_context *payload, cloudsync_context *data);
|
|
90
85
|
char *cloudsync_payload_blob (cloudsync_payload_context *payload, int64_t *blob_size, int64_t *nrows);
|
|
91
86
|
size_t cloudsync_payload_context_size (size_t *header_size);
|
|
92
|
-
int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version,
|
|
87
|
+
int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version, int64_t *new_db_version);
|
|
93
88
|
int cloudsync_payload_save (cloudsync_context *data, const char *payload_path, int *blob_size); // available only on Desktop OS (no WASM, no mobile)
|
|
94
89
|
|
|
95
90
|
// CloudSync table context
|
|
@@ -109,18 +104,38 @@ const char *table_schema (cloudsync_table_context *table);
|
|
|
109
104
|
int table_remove (cloudsync_context *data, cloudsync_table_context *table);
|
|
110
105
|
void table_free (cloudsync_table_context *table);
|
|
111
106
|
|
|
107
|
+
// Block-level LWW support
|
|
108
|
+
bool table_has_block_cols (cloudsync_table_context *table);
|
|
109
|
+
col_algo_t table_col_algo (cloudsync_table_context *table, int index);
|
|
110
|
+
const char *table_col_delimiter (cloudsync_table_context *table, int index);
|
|
111
|
+
int table_col_index (cloudsync_table_context *table, const char *col_name);
|
|
112
|
+
int block_materialize_column (cloudsync_context *data, cloudsync_table_context *table, const void *pk, int pklen, const char *base_col_name);
|
|
113
|
+
int cloudsync_setup_block_column (cloudsync_context *data, const char *table_name, const char *col_name, const char *delimiter);
|
|
114
|
+
|
|
115
|
+
// Block column accessors (avoids accessing opaque struct from outside cloudsync.c)
|
|
116
|
+
dbvm_t *table_block_value_read_stmt (cloudsync_table_context *table);
|
|
117
|
+
dbvm_t *table_block_value_write_stmt (cloudsync_table_context *table);
|
|
118
|
+
dbvm_t *table_block_list_stmt (cloudsync_table_context *table);
|
|
119
|
+
const char *table_blocks_ref (cloudsync_table_context *table);
|
|
120
|
+
void table_set_col_delimiter (cloudsync_table_context *table, int col_idx, const char *delimiter);
|
|
121
|
+
|
|
112
122
|
// local merge/apply
|
|
113
|
-
int local_mark_insert_sentinel_meta (cloudsync_table_context *table, const
|
|
114
|
-
int local_update_sentinel (cloudsync_table_context *table, const
|
|
115
|
-
int local_mark_insert_or_update_meta (cloudsync_table_context *table, const
|
|
116
|
-
int local_mark_delete_meta (cloudsync_table_context *table, const
|
|
117
|
-
int
|
|
118
|
-
int
|
|
123
|
+
int local_mark_insert_sentinel_meta (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
124
|
+
int local_update_sentinel (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
125
|
+
int local_mark_insert_or_update_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const char *col_name, int64_t db_version, int seq);
|
|
126
|
+
int local_mark_delete_meta (cloudsync_table_context *table, const void *pk, size_t pklen, int64_t db_version, int seq);
|
|
127
|
+
int local_mark_delete_block_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const char *block_colname, int64_t db_version, int seq);
|
|
128
|
+
int block_delete_value_external (cloudsync_context *data, cloudsync_table_context *table, const void *pk, size_t pklen, const char *block_colname);
|
|
129
|
+
int local_drop_meta (cloudsync_table_context *table, const void *pk, size_t pklen);
|
|
130
|
+
int local_update_move_meta (cloudsync_table_context *table, const void *pk, size_t pklen, const void *pk2, size_t pklen2, int64_t db_version);
|
|
119
131
|
|
|
120
132
|
// used by changes virtual table
|
|
121
|
-
int merge_insert_col (cloudsync_context *data, cloudsync_table_context *table, const
|
|
133
|
+
int merge_insert_col (cloudsync_context *data, cloudsync_table_context *table, const void *pk, int pklen, const char *col_name, dbvalue_t *col_value, int64_t col_version, int64_t db_version, const char *site_id, int site_len, int64_t seq, int64_t *rowid);
|
|
122
134
|
int merge_insert (cloudsync_context *data, cloudsync_table_context *table, const char *insert_pk, int insert_pk_len, int64_t insert_cl, const char *insert_name, dbvalue_t *insert_value, int64_t insert_col_version, int64_t insert_db_version, const char *insert_site_id, int insert_site_id_len, int64_t insert_seq, int64_t *rowid);
|
|
123
135
|
|
|
136
|
+
// filter rewrite
|
|
137
|
+
char *cloudsync_filter_add_row_prefix(const char *filter, const char *prefix, char **columns, int ncols);
|
|
138
|
+
|
|
124
139
|
// decode bind context
|
|
125
140
|
char *cloudsync_pk_context_tbl (cloudsync_pk_decode_bind_context *ctx, int64_t *tbl_len);
|
|
126
141
|
void *cloudsync_pk_context_pk (cloudsync_pk_decode_bind_context *ctx, int64_t *pk_len);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>CloudSync</string> <key>CFBundleIdentifier</key> <string>ai.sqlite.cloudsync</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>0.
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>CloudSync</string> <key>CFBundleIdentifier</key> <string>ai.sqlite.cloudsync</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/CloudSync.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
w+2AL7c0i9aZyp7zuURTXWpBsOI=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
O5rgVu34wwJvsHzAeeo1DJ1M8qA=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/module.modulemap</key>
|
|
16
16
|
<data>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<dict>
|
|
24
24
|
<key>hash2</key>
|
|
25
25
|
<data>
|
|
26
|
-
|
|
26
|
+
LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
|
|
27
27
|
</data>
|
|
28
28
|
</dict>
|
|
29
29
|
<key>Modules/module.modulemap</key>
|