@sqliteai/sqlite-sync-expo 1.0.0 → 1.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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/android/jniLibs/arm64-v8a/cloudsync.so +0 -0
  3. package/android/jniLibs/armeabi-v7a/cloudsync.so +0 -0
  4. package/android/jniLibs/x86_64/cloudsync.so +0 -0
  5. package/ios/CloudSync.xcframework/Info.plist +7 -7
  6. package/ios/CloudSync.xcframework/_CodeSignature/CodeDirectory +0 -0
  7. package/ios/CloudSync.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  8. package/ios/CloudSync.xcframework/_CodeSignature/CodeResources +73 -48
  9. package/ios/CloudSync.xcframework/_CodeSignature/CodeSignature +0 -0
  10. package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/CloudSync +0 -0
  11. package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/Headers/CloudSync.h +1 -1
  12. package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/Info.plist +1 -1
  13. package/ios/CloudSync.xcframework/ios-arm64/CloudSync.framework/_CodeSignature/CodeResources +3 -3
  14. package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/CloudSync +0 -0
  15. package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/Headers/CloudSync.h +1 -1
  16. package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/Info.plist +1 -1
  17. package/ios/CloudSync.xcframework/ios-arm64_x86_64-simulator/CloudSync.framework/_CodeSignature/CodeResources +3 -3
  18. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/CloudSync +0 -0
  19. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h +1 -1
  20. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/{Info.plist → Resources/Info.plist} +1 -1
  21. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/A/CloudSync +0 -0
  22. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/A/Headers/CloudSync.h +150 -0
  23. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/A/Modules/module.modulemap +1 -0
  24. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/A/Resources/Info.plist +1 -0
  25. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/{_CodeSignature → Versions/A/_CodeSignature}/CodeResources +45 -27
  26. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/Current/CloudSync +0 -0
  27. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/Current/Headers/CloudSync.h +150 -0
  28. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/Current/Modules/module.modulemap +1 -0
  29. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/Current/Resources/Info.plist +1 -0
  30. package/ios/CloudSync.xcframework/macos-arm64_x86_64/CloudSync.framework/Versions/Current/_CodeSignature/CodeResources +142 -0
  31. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  SQLite Sync extension for Expo apps.
4
4
 
5
- **Version:** 1.0.0
5
+ **Version:** 1.0.2
6
6
 
7
7
  This package provides pre-built SQLite Sync binaries for iOS and Android, along with an Expo config plugin that automatically configures your native projects.
8
8
 
Binary file
@@ -22,7 +22,7 @@
22
22
  <key>BinaryPath</key>
23
23
  <string>CloudSync.framework/CloudSync</string>
24
24
  <key>LibraryIdentifier</key>
25
- <string>macos-arm64_x86_64</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
26
26
  <key>LibraryPath</key>
27
27
  <string>CloudSync.framework</string>
28
28
  <key>SupportedArchitectures</key>
@@ -31,13 +31,15 @@
31
31
  <string>x86_64</string>
32
32
  </array>
33
33
  <key>SupportedPlatform</key>
34
- <string>macos</string>
34
+ <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
35
37
  </dict>
36
38
  <dict>
37
39
  <key>BinaryPath</key>
38
- <string>CloudSync.framework/CloudSync</string>
40
+ <string>CloudSync.framework/Versions/A/CloudSync</string>
39
41
  <key>LibraryIdentifier</key>
40
- <string>ios-arm64_x86_64-simulator</string>
42
+ <string>macos-arm64_x86_64</string>
41
43
  <key>LibraryPath</key>
42
44
  <string>CloudSync.framework</string>
43
45
  <key>SupportedArchitectures</key>
@@ -46,9 +48,7 @@
46
48
  <string>x86_64</string>
47
49
  </array>
48
50
  <key>SupportedPlatform</key>
49
- <string>ios</string>
50
- <key>SupportedPlatformVariant</key>
51
- <string>simulator</string>
51
+ <string>macos</string>
52
52
  </dict>
53
53
  </array>
54
54
  <key>CFBundlePackageType</key>
@@ -6,15 +6,15 @@
6
6
  <dict>
7
7
  <key>ios-arm64/CloudSync.framework/CloudSync</key>
8
8
  <data>
9
- q5ZXQGgR6J6ChKleZM7XuKbC78s=
9
+ d0g4b+sSKry5atUTKn2/A5SiTVQ=
10
10
  </data>
11
11
  <key>ios-arm64/CloudSync.framework/Headers/CloudSync.h</key>
12
12
  <data>
13
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
13
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
14
14
  </data>
15
15
  <key>ios-arm64/CloudSync.framework/Info.plist</key>
16
16
  <data>
17
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
17
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
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
- Bll65gIdzqCXIbyXGXatX5piehs=
25
+ ZDq+r2c25X7xarGi3iafvW+Z6Wc=
26
26
  </data>
27
27
  <key>ios-arm64_x86_64-simulator/CloudSync.framework/CloudSync</key>
28
28
  <data>
29
- JbXqj7dQM1oDPy1RgrcCBQcArrM=
29
+ YVvUHf5BxFkDnUsUVvz+oNN7tFo=
30
30
  </data>
31
31
  <key>ios-arm64_x86_64-simulator/CloudSync.framework/Headers/CloudSync.h</key>
32
32
  <data>
33
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
33
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
34
34
  </data>
35
35
  <key>ios-arm64_x86_64-simulator/CloudSync.framework/Info.plist</key>
36
36
  <data>
37
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
37
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
38
38
  </data>
39
39
  <key>ios-arm64_x86_64-simulator/CloudSync.framework/Modules/module.modulemap</key>
40
40
  <data>
@@ -42,27 +42,27 @@
42
42
  </data>
43
43
  <key>ios-arm64_x86_64-simulator/CloudSync.framework/_CodeSignature/CodeResources</key>
44
44
  <data>
45
- Bll65gIdzqCXIbyXGXatX5piehs=
45
+ ZDq+r2c25X7xarGi3iafvW+Z6Wc=
46
46
  </data>
47
- <key>macos-arm64_x86_64/CloudSync.framework/CloudSync</key>
47
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/CloudSync</key>
48
48
  <data>
49
- R8dwwiDfopk/jdtvZFonCTFRedQ=
49
+ fG5+n3Verg9GG84mRRH7TkyUD08=
50
50
  </data>
51
- <key>macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h</key>
51
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/Headers/CloudSync.h</key>
52
52
  <data>
53
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
53
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
54
54
  </data>
55
- <key>macos-arm64_x86_64/CloudSync.framework/Info.plist</key>
55
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/Modules/module.modulemap</key>
56
56
  <data>
57
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
57
+ ro9xghwl6x7oHnWfH0PiOV6up+o=
58
58
  </data>
59
- <key>macos-arm64_x86_64/CloudSync.framework/Modules/module.modulemap</key>
59
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/Resources/Info.plist</key>
60
60
  <data>
61
- ro9xghwl6x7oHnWfH0PiOV6up+o=
61
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
62
62
  </data>
63
- <key>macos-arm64_x86_64/CloudSync.framework/_CodeSignature/CodeResources</key>
63
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/_CodeSignature/CodeResources</key>
64
64
  <data>
65
- Bll65gIdzqCXIbyXGXatX5piehs=
65
+ +GRTLtJJF4EHYSMtdVeLo8oQTdA=
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
- q5ZXQGgR6J6ChKleZM7XuKbC78s=
74
+ d0g4b+sSKry5atUTKn2/A5SiTVQ=
75
75
  </data>
76
76
  <key>hash2</key>
77
77
  <data>
78
- eE3Ci0TO41UgqA3zJSsHSQjY99H9pzm4PsVAURfongY=
78
+ Jq4bG5BXVHHjLielPxpOTwhFk7p+L1h+vyJPE1x8yao=
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
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
85
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
86
86
  </data>
87
87
  <key>hash2</key>
88
88
  <data>
89
- LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
89
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
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
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
96
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
97
97
  </data>
98
98
  <key>hash2</key>
99
99
  <data>
100
- hNvDddt4wn7ToXMhkxxCLsOSw9OwjpRHYL+80x0dcZw=
100
+ NWikl3wgbIrSA9zomQ0EpmcJLbS3bAGSogMsvy+G2NM=
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
- Bll65gIdzqCXIbyXGXatX5piehs=
118
+ ZDq+r2c25X7xarGi3iafvW+Z6Wc=
119
119
  </data>
120
120
  <key>hash2</key>
121
121
  <data>
122
- g40GMRnd7lx2ZKTWQ5yiJaRgNJdHdeLY6vBGx/VplJE=
122
+ b0DnjS5D5O22oZo931NK65MsHVDMvNDoZH/H00NvtFo=
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
- JbXqj7dQM1oDPy1RgrcCBQcArrM=
129
+ YVvUHf5BxFkDnUsUVvz+oNN7tFo=
130
130
  </data>
131
131
  <key>hash2</key>
132
132
  <data>
133
- mk7Wpl0ekG5d3BrEkPRB1ag1yodxkScCyPOPSuq4TgI=
133
+ gK9Wb250P8GdG0xO34B2m+CfWpjIZsVPNpE2393Yelg=
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
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
140
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
141
141
  </data>
142
142
  <key>hash2</key>
143
143
  <data>
144
- LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
144
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
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
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
151
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
152
152
  </data>
153
153
  <key>hash2</key>
154
154
  <data>
155
- hNvDddt4wn7ToXMhkxxCLsOSw9OwjpRHYL+80x0dcZw=
155
+ NWikl3wgbIrSA9zomQ0EpmcJLbS3bAGSogMsvy+G2NM=
156
156
  </data>
157
157
  </dict>
158
158
  <key>ios-arm64_x86_64-simulator/CloudSync.framework/Modules/module.modulemap</key>
@@ -170,68 +170,93 @@
170
170
  <dict>
171
171
  <key>hash</key>
172
172
  <data>
173
- Bll65gIdzqCXIbyXGXatX5piehs=
173
+ ZDq+r2c25X7xarGi3iafvW+Z6Wc=
174
174
  </data>
175
175
  <key>hash2</key>
176
176
  <data>
177
- g40GMRnd7lx2ZKTWQ5yiJaRgNJdHdeLY6vBGx/VplJE=
177
+ b0DnjS5D5O22oZo931NK65MsHVDMvNDoZH/H00NvtFo=
178
178
  </data>
179
179
  </dict>
180
180
  <key>macos-arm64_x86_64/CloudSync.framework/CloudSync</key>
181
+ <dict>
182
+ <key>symlink</key>
183
+ <string>Versions/Current/CloudSync</string>
184
+ </dict>
185
+ <key>macos-arm64_x86_64/CloudSync.framework/Headers</key>
186
+ <dict>
187
+ <key>symlink</key>
188
+ <string>Versions/Current/Headers</string>
189
+ </dict>
190
+ <key>macos-arm64_x86_64/CloudSync.framework/Modules</key>
191
+ <dict>
192
+ <key>symlink</key>
193
+ <string>Versions/Current/Modules</string>
194
+ </dict>
195
+ <key>macos-arm64_x86_64/CloudSync.framework/Resources</key>
196
+ <dict>
197
+ <key>symlink</key>
198
+ <string>Versions/Current/Resources</string>
199
+ </dict>
200
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/CloudSync</key>
181
201
  <dict>
182
202
  <key>hash</key>
183
203
  <data>
184
- R8dwwiDfopk/jdtvZFonCTFRedQ=
204
+ fG5+n3Verg9GG84mRRH7TkyUD08=
185
205
  </data>
186
206
  <key>hash2</key>
187
207
  <data>
188
- 1+ThEtMZ6ljbGcFkrfAHk7j09Q9O+jIFOsfEHbfAU9Y=
208
+ KdWeK457vZxX3hSRHG2Uohwahpo4JSQ6E+0jvADgcdw=
189
209
  </data>
190
210
  </dict>
191
- <key>macos-arm64_x86_64/CloudSync.framework/Headers/CloudSync.h</key>
211
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/Headers/CloudSync.h</key>
192
212
  <dict>
193
213
  <key>hash</key>
194
214
  <data>
195
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
215
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
196
216
  </data>
197
217
  <key>hash2</key>
198
218
  <data>
199
- LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
219
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
200
220
  </data>
201
221
  </dict>
202
- <key>macos-arm64_x86_64/CloudSync.framework/Info.plist</key>
222
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/Modules/module.modulemap</key>
203
223
  <dict>
204
224
  <key>hash</key>
205
225
  <data>
206
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
226
+ ro9xghwl6x7oHnWfH0PiOV6up+o=
207
227
  </data>
208
228
  <key>hash2</key>
209
229
  <data>
210
- hNvDddt4wn7ToXMhkxxCLsOSw9OwjpRHYL+80x0dcZw=
230
+ bIwPn3WW18gPsoCQuL+cYaEBTMqTFCR6Y8FSln2GcXQ=
211
231
  </data>
212
232
  </dict>
213
- <key>macos-arm64_x86_64/CloudSync.framework/Modules/module.modulemap</key>
233
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/Resources/Info.plist</key>
214
234
  <dict>
215
235
  <key>hash</key>
216
236
  <data>
217
- ro9xghwl6x7oHnWfH0PiOV6up+o=
237
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
218
238
  </data>
219
239
  <key>hash2</key>
220
240
  <data>
221
- bIwPn3WW18gPsoCQuL+cYaEBTMqTFCR6Y8FSln2GcXQ=
241
+ NWikl3wgbIrSA9zomQ0EpmcJLbS3bAGSogMsvy+G2NM=
222
242
  </data>
223
243
  </dict>
224
- <key>macos-arm64_x86_64/CloudSync.framework/_CodeSignature/CodeResources</key>
244
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/A/_CodeSignature/CodeResources</key>
225
245
  <dict>
226
246
  <key>hash</key>
227
247
  <data>
228
- Bll65gIdzqCXIbyXGXatX5piehs=
248
+ +GRTLtJJF4EHYSMtdVeLo8oQTdA=
229
249
  </data>
230
250
  <key>hash2</key>
231
251
  <data>
232
- g40GMRnd7lx2ZKTWQ5yiJaRgNJdHdeLY6vBGx/VplJE=
252
+ TuNyLFlfa+HRK/GY4NczqeNstvS4KXZ+USqGVTzHw9w=
233
253
  </data>
234
254
  </dict>
255
+ <key>macos-arm64_x86_64/CloudSync.framework/Versions/Current</key>
256
+ <dict>
257
+ <key>symlink</key>
258
+ <string>A</string>
259
+ </dict>
235
260
  </dict>
236
261
  <key>rules</key>
237
262
  <dict>
@@ -18,7 +18,7 @@
18
18
  extern "C" {
19
19
  #endif
20
20
 
21
- #define CLOUDSYNC_VERSION "1.0.0"
21
+ #define CLOUDSYNC_VERSION "1.0.2"
22
22
  #define CLOUDSYNC_MAX_TABLENAME_LEN 512
23
23
 
24
24
  #define CLOUDSYNC_VALUE_NOTSET -1
@@ -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>1.0.0</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
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.2</string> <key>CFBundleShortVersionString</key> <string>1.0.2</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
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
9
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
13
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
13
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
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
- LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
26
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
27
27
  </data>
28
28
  </dict>
29
29
  <key>Modules/module.modulemap</key>
@@ -18,7 +18,7 @@
18
18
  extern "C" {
19
19
  #endif
20
20
 
21
- #define CLOUDSYNC_VERSION "1.0.0"
21
+ #define CLOUDSYNC_VERSION "1.0.2"
22
22
  #define CLOUDSYNC_MAX_TABLENAME_LEN 512
23
23
 
24
24
  #define CLOUDSYNC_VALUE_NOTSET -1
@@ -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>1.0.0</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
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.2</string> <key>CFBundleShortVersionString</key> <string>1.0.2</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
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
9
+ EYNgk8nKEftESaeKAXCmFSfK2qM=
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
13
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
13
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
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
- LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
26
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
27
27
  </data>
28
28
  </dict>
29
29
  <key>Modules/module.modulemap</key>
@@ -18,7 +18,7 @@
18
18
  extern "C" {
19
19
  #endif
20
20
 
21
- #define CLOUDSYNC_VERSION "1.0.0"
21
+ #define CLOUDSYNC_VERSION "1.0.2"
22
22
  #define CLOUDSYNC_MAX_TABLENAME_LEN 512
23
23
 
24
24
  #define CLOUDSYNC_VALUE_NOTSET -1
@@ -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>1.0.0</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
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.2</string> <key>CFBundleShortVersionString</key> <string>1.0.2</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
@@ -0,0 +1,150 @@
1
+ //
2
+ // cloudsync.h
3
+ // cloudsync
4
+ //
5
+ // Created by Marco Bambini on 16/05/24.
6
+ //
7
+
8
+ #ifndef __CLOUDSYNC__
9
+ #define __CLOUDSYNC__
10
+
11
+ #include <stdint.h>
12
+ #include <stddef.h>
13
+ #include <stdbool.h>
14
+ #include "database.h"
15
+ #include "block.h"
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ #define CLOUDSYNC_VERSION "1.0.2"
22
+ #define CLOUDSYNC_MAX_TABLENAME_LEN 512
23
+
24
+ #define CLOUDSYNC_VALUE_NOTSET -1
25
+ #define CLOUDSYNC_TOMBSTONE_VALUE "__[RIP]__"
26
+ #define CLOUDSYNC_RLS_RESTRICTED_VALUE "__[RLS]__"
27
+ #define CLOUDSYNC_DISABLE_ROWIDONLY_TABLES 1
28
+ #define CLOUDSYNC_DEFAULT_ALGO "cls"
29
+
30
+ #define CLOUDSYNC_CHANGES_NCOLS 9
31
+
32
+ // CRDT Algos
33
+ table_algo cloudsync_algo_from_name (const char *algo_name);
34
+ const char *cloudsync_algo_name (table_algo algo);
35
+
36
+ // Opaque structures
37
+ typedef struct cloudsync_payload_context cloudsync_payload_context;
38
+ typedef struct cloudsync_table_context cloudsync_table_context;
39
+
40
+ // CloudSync context
41
+ cloudsync_context *cloudsync_context_create (void *db);
42
+ const char *cloudsync_context_init (cloudsync_context *data);
43
+ void cloudsync_context_free (void *ctx);
44
+
45
+ // CloudSync global
46
+ int cloudsync_init_table (cloudsync_context *data, const char *table_name, const char *algo_name, bool skip_int_pk_check);
47
+ int cloudsync_cleanup (cloudsync_context *data, const char *table_name);
48
+ int cloudsync_cleanup_all (cloudsync_context *data);
49
+ int cloudsync_terminate (cloudsync_context *data);
50
+ int cloudsync_insync (cloudsync_context *data);
51
+ int cloudsync_bumpseq (cloudsync_context *data);
52
+ void *cloudsync_siteid (cloudsync_context *data);
53
+ void cloudsync_reset_siteid (cloudsync_context *data);
54
+ void cloudsync_sync_key (cloudsync_context *data, const char *key, const char *value);
55
+ int64_t cloudsync_dbversion_next (cloudsync_context *data, int64_t merging_version);
56
+ int64_t cloudsync_dbversion (cloudsync_context *data);
57
+ void cloudsync_update_schema_hash (cloudsync_context *data);
58
+ int cloudsync_dbversion_check_uptodate (cloudsync_context *data);
59
+ bool cloudsync_config_exists (cloudsync_context *data);
60
+ dbvm_t *cloudsync_colvalue_stmt (cloudsync_context *data, const char *tbl_name, bool *persistent);
61
+
62
+ // CloudSync alter table
63
+ int cloudsync_begin_alter (cloudsync_context *data, const char *table_name);
64
+ int cloudsync_commit_alter (cloudsync_context *data, const char *table_name);
65
+
66
+ // CloudSync getter/setter
67
+ void *cloudsync_db (cloudsync_context *data);
68
+ void *cloudsync_auxdata (cloudsync_context *data);
69
+ void cloudsync_set_auxdata (cloudsync_context *data, void *xdata);
70
+ int cloudsync_set_error (cloudsync_context *data, const char *err_user, int err_code);
71
+ int cloudsync_set_dberror (cloudsync_context *data);
72
+ const char *cloudsync_errmsg (cloudsync_context *data);
73
+ int cloudsync_errcode (cloudsync_context *data);
74
+ void cloudsync_reset_error (cloudsync_context *data);
75
+ int cloudsync_commit_hook (void *ctx);
76
+ void cloudsync_rollback_hook (void *ctx);
77
+ void cloudsync_set_schema (cloudsync_context *data, const char *schema);
78
+ const char *cloudsync_schema (cloudsync_context *data);
79
+ const char *cloudsync_table_schema (cloudsync_context *data, const char *table_name);
80
+
81
+ // Payload
82
+ int cloudsync_payload_apply (cloudsync_context *data, const char *payload, int blen, int *nrows);
83
+ int cloudsync_payload_encode_step (cloudsync_payload_context *payload, cloudsync_context *data, int argc, dbvalue_t **argv);
84
+ int cloudsync_payload_encode_final (cloudsync_payload_context *payload, cloudsync_context *data);
85
+ char *cloudsync_payload_blob (cloudsync_payload_context *payload, int64_t *blob_size, int64_t *nrows);
86
+ size_t cloudsync_payload_context_size (size_t *header_size);
87
+ int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version, int64_t *new_db_version);
88
+ int cloudsync_payload_save (cloudsync_context *data, const char *payload_path, int *blob_size); // available only on Desktop OS (no WASM, no mobile)
89
+
90
+ // CloudSync table context
91
+ cloudsync_table_context *table_lookup (cloudsync_context *data, const char *table_name);
92
+ void *table_column_lookup (cloudsync_table_context *table, const char *col_name, bool is_merge, int *index);
93
+ bool table_enabled (cloudsync_table_context *table);
94
+ void table_set_enabled (cloudsync_table_context *table, bool value);
95
+ bool table_add_to_context (cloudsync_context *data, table_algo algo, const char *table_name);
96
+ bool table_pk_exists (cloudsync_table_context *table, const char *value, size_t len);
97
+ int table_count_cols (cloudsync_table_context *table);
98
+ int table_count_pks (cloudsync_table_context *table);
99
+ const char *table_colname (cloudsync_table_context *table, int index);
100
+ char **table_pknames (cloudsync_table_context *table);
101
+ void table_set_pknames (cloudsync_table_context *table, char **pknames);
102
+ bool table_algo_isgos (cloudsync_table_context *table);
103
+ const char *table_schema (cloudsync_table_context *table);
104
+ int table_remove (cloudsync_context *data, cloudsync_table_context *table);
105
+ void table_free (cloudsync_table_context *table);
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
+
122
+ // local merge/apply
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);
131
+
132
+ // used by changes virtual table
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);
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);
135
+
136
+ // filter rewrite
137
+ char *cloudsync_filter_add_row_prefix(const char *filter, const char *prefix, char **columns, int ncols);
138
+
139
+ // decode bind context
140
+ char *cloudsync_pk_context_tbl (cloudsync_pk_decode_bind_context *ctx, int64_t *tbl_len);
141
+ void *cloudsync_pk_context_pk (cloudsync_pk_decode_bind_context *ctx, int64_t *pk_len);
142
+ char *cloudsync_pk_context_colname (cloudsync_pk_decode_bind_context *ctx, int64_t *colname_len);
143
+ int64_t cloudsync_pk_context_cl (cloudsync_pk_decode_bind_context *ctx);
144
+ int64_t cloudsync_pk_context_dbversion (cloudsync_pk_decode_bind_context *ctx);
145
+
146
+ #ifdef __cplusplus
147
+ }
148
+ #endif
149
+
150
+ #endif
@@ -0,0 +1 @@
1
+ framework module CloudSync { umbrella header "CloudSync.h" export * }
@@ -0,0 +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>1.0.2</string> <key>CFBundleShortVersionString</key> <string>1.0.2</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
@@ -4,17 +4,9 @@
4
4
  <dict>
5
5
  <key>files</key>
6
6
  <dict>
7
- <key>Headers/CloudSync.h</key>
8
- <data>
9
- w+2AL7c0i9aZyp7zuURTXWpBsOI=
10
- </data>
11
- <key>Info.plist</key>
12
- <data>
13
- O5rgVu34wwJvsHzAeeo1DJ1M8qA=
14
- </data>
15
- <key>Modules/module.modulemap</key>
7
+ <key>Resources/Info.plist</key>
16
8
  <data>
17
- ro9xghwl6x7oHnWfH0PiOV6up+o=
9
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
18
10
  </data>
19
11
  </dict>
20
12
  <key>files2</key>
@@ -23,7 +15,7 @@
23
15
  <dict>
24
16
  <key>hash2</key>
25
17
  <data>
26
- LP+g8KJNzYd6/f27M3ocvlzDixwpAllCLqZXCIAqMk4=
18
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
27
19
  </data>
28
20
  </dict>
29
21
  <key>Modules/module.modulemap</key>
@@ -33,26 +25,33 @@
33
25
  bIwPn3WW18gPsoCQuL+cYaEBTMqTFCR6Y8FSln2GcXQ=
34
26
  </data>
35
27
  </dict>
28
+ <key>Resources/Info.plist</key>
29
+ <dict>
30
+ <key>hash2</key>
31
+ <data>
32
+ NWikl3wgbIrSA9zomQ0EpmcJLbS3bAGSogMsvy+G2NM=
33
+ </data>
34
+ </dict>
36
35
  </dict>
37
36
  <key>rules</key>
38
37
  <dict>
39
- <key>^.*</key>
38
+ <key>^Resources/</key>
40
39
  <true/>
41
- <key>^.*\.lproj/</key>
40
+ <key>^Resources/.*\.lproj/</key>
42
41
  <dict>
43
42
  <key>optional</key>
44
43
  <true/>
45
44
  <key>weight</key>
46
45
  <real>1000</real>
47
46
  </dict>
48
- <key>^.*\.lproj/locversion.plist$</key>
47
+ <key>^Resources/.*\.lproj/locversion.plist$</key>
49
48
  <dict>
50
49
  <key>omit</key>
51
50
  <true/>
52
51
  <key>weight</key>
53
52
  <real>1100</real>
54
53
  </dict>
55
- <key>^Base\.lproj/</key>
54
+ <key>^Resources/Base\.lproj/</key>
56
55
  <dict>
57
56
  <key>weight</key>
58
57
  <real>1010</real>
@@ -74,40 +73,59 @@
74
73
  <key>weight</key>
75
74
  <real>2000</real>
76
75
  </dict>
76
+ <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
77
+ <dict>
78
+ <key>nested</key>
79
+ <true/>
80
+ <key>weight</key>
81
+ <real>10</real>
82
+ </dict>
77
83
  <key>^.*</key>
78
84
  <true/>
79
- <key>^.*\.lproj/</key>
85
+ <key>^Info\.plist$</key>
80
86
  <dict>
81
- <key>optional</key>
87
+ <key>omit</key>
82
88
  <true/>
83
89
  <key>weight</key>
84
- <real>1000</real>
90
+ <real>20</real>
85
91
  </dict>
86
- <key>^.*\.lproj/locversion.plist$</key>
92
+ <key>^PkgInfo$</key>
87
93
  <dict>
88
94
  <key>omit</key>
89
95
  <true/>
90
96
  <key>weight</key>
91
- <real>1100</real>
97
+ <real>20</real>
92
98
  </dict>
93
- <key>^Base\.lproj/</key>
99
+ <key>^Resources/</key>
94
100
  <dict>
95
101
  <key>weight</key>
96
- <real>1010</real>
102
+ <real>20</real>
97
103
  </dict>
98
- <key>^Info\.plist$</key>
104
+ <key>^Resources/.*\.lproj/</key>
99
105
  <dict>
100
- <key>omit</key>
106
+ <key>optional</key>
101
107
  <true/>
102
108
  <key>weight</key>
103
- <real>20</real>
109
+ <real>1000</real>
104
110
  </dict>
105
- <key>^PkgInfo$</key>
111
+ <key>^Resources/.*\.lproj/locversion.plist$</key>
106
112
  <dict>
107
113
  <key>omit</key>
108
114
  <true/>
109
115
  <key>weight</key>
110
- <real>20</real>
116
+ <real>1100</real>
117
+ </dict>
118
+ <key>^Resources/Base\.lproj/</key>
119
+ <dict>
120
+ <key>weight</key>
121
+ <real>1010</real>
122
+ </dict>
123
+ <key>^[^/]+$</key>
124
+ <dict>
125
+ <key>nested</key>
126
+ <true/>
127
+ <key>weight</key>
128
+ <real>10</real>
111
129
  </dict>
112
130
  <key>^embedded\.provisionprofile$</key>
113
131
  <dict>
@@ -0,0 +1,150 @@
1
+ //
2
+ // cloudsync.h
3
+ // cloudsync
4
+ //
5
+ // Created by Marco Bambini on 16/05/24.
6
+ //
7
+
8
+ #ifndef __CLOUDSYNC__
9
+ #define __CLOUDSYNC__
10
+
11
+ #include <stdint.h>
12
+ #include <stddef.h>
13
+ #include <stdbool.h>
14
+ #include "database.h"
15
+ #include "block.h"
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ #define CLOUDSYNC_VERSION "1.0.2"
22
+ #define CLOUDSYNC_MAX_TABLENAME_LEN 512
23
+
24
+ #define CLOUDSYNC_VALUE_NOTSET -1
25
+ #define CLOUDSYNC_TOMBSTONE_VALUE "__[RIP]__"
26
+ #define CLOUDSYNC_RLS_RESTRICTED_VALUE "__[RLS]__"
27
+ #define CLOUDSYNC_DISABLE_ROWIDONLY_TABLES 1
28
+ #define CLOUDSYNC_DEFAULT_ALGO "cls"
29
+
30
+ #define CLOUDSYNC_CHANGES_NCOLS 9
31
+
32
+ // CRDT Algos
33
+ table_algo cloudsync_algo_from_name (const char *algo_name);
34
+ const char *cloudsync_algo_name (table_algo algo);
35
+
36
+ // Opaque structures
37
+ typedef struct cloudsync_payload_context cloudsync_payload_context;
38
+ typedef struct cloudsync_table_context cloudsync_table_context;
39
+
40
+ // CloudSync context
41
+ cloudsync_context *cloudsync_context_create (void *db);
42
+ const char *cloudsync_context_init (cloudsync_context *data);
43
+ void cloudsync_context_free (void *ctx);
44
+
45
+ // CloudSync global
46
+ int cloudsync_init_table (cloudsync_context *data, const char *table_name, const char *algo_name, bool skip_int_pk_check);
47
+ int cloudsync_cleanup (cloudsync_context *data, const char *table_name);
48
+ int cloudsync_cleanup_all (cloudsync_context *data);
49
+ int cloudsync_terminate (cloudsync_context *data);
50
+ int cloudsync_insync (cloudsync_context *data);
51
+ int cloudsync_bumpseq (cloudsync_context *data);
52
+ void *cloudsync_siteid (cloudsync_context *data);
53
+ void cloudsync_reset_siteid (cloudsync_context *data);
54
+ void cloudsync_sync_key (cloudsync_context *data, const char *key, const char *value);
55
+ int64_t cloudsync_dbversion_next (cloudsync_context *data, int64_t merging_version);
56
+ int64_t cloudsync_dbversion (cloudsync_context *data);
57
+ void cloudsync_update_schema_hash (cloudsync_context *data);
58
+ int cloudsync_dbversion_check_uptodate (cloudsync_context *data);
59
+ bool cloudsync_config_exists (cloudsync_context *data);
60
+ dbvm_t *cloudsync_colvalue_stmt (cloudsync_context *data, const char *tbl_name, bool *persistent);
61
+
62
+ // CloudSync alter table
63
+ int cloudsync_begin_alter (cloudsync_context *data, const char *table_name);
64
+ int cloudsync_commit_alter (cloudsync_context *data, const char *table_name);
65
+
66
+ // CloudSync getter/setter
67
+ void *cloudsync_db (cloudsync_context *data);
68
+ void *cloudsync_auxdata (cloudsync_context *data);
69
+ void cloudsync_set_auxdata (cloudsync_context *data, void *xdata);
70
+ int cloudsync_set_error (cloudsync_context *data, const char *err_user, int err_code);
71
+ int cloudsync_set_dberror (cloudsync_context *data);
72
+ const char *cloudsync_errmsg (cloudsync_context *data);
73
+ int cloudsync_errcode (cloudsync_context *data);
74
+ void cloudsync_reset_error (cloudsync_context *data);
75
+ int cloudsync_commit_hook (void *ctx);
76
+ void cloudsync_rollback_hook (void *ctx);
77
+ void cloudsync_set_schema (cloudsync_context *data, const char *schema);
78
+ const char *cloudsync_schema (cloudsync_context *data);
79
+ const char *cloudsync_table_schema (cloudsync_context *data, const char *table_name);
80
+
81
+ // Payload
82
+ int cloudsync_payload_apply (cloudsync_context *data, const char *payload, int blen, int *nrows);
83
+ int cloudsync_payload_encode_step (cloudsync_payload_context *payload, cloudsync_context *data, int argc, dbvalue_t **argv);
84
+ int cloudsync_payload_encode_final (cloudsync_payload_context *payload, cloudsync_context *data);
85
+ char *cloudsync_payload_blob (cloudsync_payload_context *payload, int64_t *blob_size, int64_t *nrows);
86
+ size_t cloudsync_payload_context_size (size_t *header_size);
87
+ int cloudsync_payload_get (cloudsync_context *data, char **blob, int *blob_size, int *db_version, int64_t *new_db_version);
88
+ int cloudsync_payload_save (cloudsync_context *data, const char *payload_path, int *blob_size); // available only on Desktop OS (no WASM, no mobile)
89
+
90
+ // CloudSync table context
91
+ cloudsync_table_context *table_lookup (cloudsync_context *data, const char *table_name);
92
+ void *table_column_lookup (cloudsync_table_context *table, const char *col_name, bool is_merge, int *index);
93
+ bool table_enabled (cloudsync_table_context *table);
94
+ void table_set_enabled (cloudsync_table_context *table, bool value);
95
+ bool table_add_to_context (cloudsync_context *data, table_algo algo, const char *table_name);
96
+ bool table_pk_exists (cloudsync_table_context *table, const char *value, size_t len);
97
+ int table_count_cols (cloudsync_table_context *table);
98
+ int table_count_pks (cloudsync_table_context *table);
99
+ const char *table_colname (cloudsync_table_context *table, int index);
100
+ char **table_pknames (cloudsync_table_context *table);
101
+ void table_set_pknames (cloudsync_table_context *table, char **pknames);
102
+ bool table_algo_isgos (cloudsync_table_context *table);
103
+ const char *table_schema (cloudsync_table_context *table);
104
+ int table_remove (cloudsync_context *data, cloudsync_table_context *table);
105
+ void table_free (cloudsync_table_context *table);
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
+
122
+ // local merge/apply
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);
131
+
132
+ // used by changes virtual table
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);
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);
135
+
136
+ // filter rewrite
137
+ char *cloudsync_filter_add_row_prefix(const char *filter, const char *prefix, char **columns, int ncols);
138
+
139
+ // decode bind context
140
+ char *cloudsync_pk_context_tbl (cloudsync_pk_decode_bind_context *ctx, int64_t *tbl_len);
141
+ void *cloudsync_pk_context_pk (cloudsync_pk_decode_bind_context *ctx, int64_t *pk_len);
142
+ char *cloudsync_pk_context_colname (cloudsync_pk_decode_bind_context *ctx, int64_t *colname_len);
143
+ int64_t cloudsync_pk_context_cl (cloudsync_pk_decode_bind_context *ctx);
144
+ int64_t cloudsync_pk_context_dbversion (cloudsync_pk_decode_bind_context *ctx);
145
+
146
+ #ifdef __cplusplus
147
+ }
148
+ #endif
149
+
150
+ #endif
@@ -0,0 +1 @@
1
+ framework module CloudSync { umbrella header "CloudSync.h" export * }
@@ -0,0 +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>1.0.2</string> <key>CFBundleShortVersionString</key> <string>1.0.2</string> <key>MinimumOSVersion</key> <string>11.0</string> </dict> </plist>
@@ -0,0 +1,142 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>files</key>
6
+ <dict>
7
+ <key>Resources/Info.plist</key>
8
+ <data>
9
+ WDp/9ov4Dhby3sTyltyMOyNE11I=
10
+ </data>
11
+ </dict>
12
+ <key>files2</key>
13
+ <dict>
14
+ <key>Headers/CloudSync.h</key>
15
+ <dict>
16
+ <key>hash2</key>
17
+ <data>
18
+ ab3NUPXxAqFIiM5TOB1fDw930WQhxgUEw2zOjY2e8r0=
19
+ </data>
20
+ </dict>
21
+ <key>Modules/module.modulemap</key>
22
+ <dict>
23
+ <key>hash2</key>
24
+ <data>
25
+ bIwPn3WW18gPsoCQuL+cYaEBTMqTFCR6Y8FSln2GcXQ=
26
+ </data>
27
+ </dict>
28
+ <key>Resources/Info.plist</key>
29
+ <dict>
30
+ <key>hash2</key>
31
+ <data>
32
+ NWikl3wgbIrSA9zomQ0EpmcJLbS3bAGSogMsvy+G2NM=
33
+ </data>
34
+ </dict>
35
+ </dict>
36
+ <key>rules</key>
37
+ <dict>
38
+ <key>^Resources/</key>
39
+ <true/>
40
+ <key>^Resources/.*\.lproj/</key>
41
+ <dict>
42
+ <key>optional</key>
43
+ <true/>
44
+ <key>weight</key>
45
+ <real>1000</real>
46
+ </dict>
47
+ <key>^Resources/.*\.lproj/locversion.plist$</key>
48
+ <dict>
49
+ <key>omit</key>
50
+ <true/>
51
+ <key>weight</key>
52
+ <real>1100</real>
53
+ </dict>
54
+ <key>^Resources/Base\.lproj/</key>
55
+ <dict>
56
+ <key>weight</key>
57
+ <real>1010</real>
58
+ </dict>
59
+ <key>^version.plist$</key>
60
+ <true/>
61
+ </dict>
62
+ <key>rules2</key>
63
+ <dict>
64
+ <key>.*\.dSYM($|/)</key>
65
+ <dict>
66
+ <key>weight</key>
67
+ <real>11</real>
68
+ </dict>
69
+ <key>^(.*/)?\.DS_Store$</key>
70
+ <dict>
71
+ <key>omit</key>
72
+ <true/>
73
+ <key>weight</key>
74
+ <real>2000</real>
75
+ </dict>
76
+ <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
77
+ <dict>
78
+ <key>nested</key>
79
+ <true/>
80
+ <key>weight</key>
81
+ <real>10</real>
82
+ </dict>
83
+ <key>^.*</key>
84
+ <true/>
85
+ <key>^Info\.plist$</key>
86
+ <dict>
87
+ <key>omit</key>
88
+ <true/>
89
+ <key>weight</key>
90
+ <real>20</real>
91
+ </dict>
92
+ <key>^PkgInfo$</key>
93
+ <dict>
94
+ <key>omit</key>
95
+ <true/>
96
+ <key>weight</key>
97
+ <real>20</real>
98
+ </dict>
99
+ <key>^Resources/</key>
100
+ <dict>
101
+ <key>weight</key>
102
+ <real>20</real>
103
+ </dict>
104
+ <key>^Resources/.*\.lproj/</key>
105
+ <dict>
106
+ <key>optional</key>
107
+ <true/>
108
+ <key>weight</key>
109
+ <real>1000</real>
110
+ </dict>
111
+ <key>^Resources/.*\.lproj/locversion.plist$</key>
112
+ <dict>
113
+ <key>omit</key>
114
+ <true/>
115
+ <key>weight</key>
116
+ <real>1100</real>
117
+ </dict>
118
+ <key>^Resources/Base\.lproj/</key>
119
+ <dict>
120
+ <key>weight</key>
121
+ <real>1010</real>
122
+ </dict>
123
+ <key>^[^/]+$</key>
124
+ <dict>
125
+ <key>nested</key>
126
+ <true/>
127
+ <key>weight</key>
128
+ <real>10</real>
129
+ </dict>
130
+ <key>^embedded\.provisionprofile$</key>
131
+ <dict>
132
+ <key>weight</key>
133
+ <real>20</real>
134
+ </dict>
135
+ <key>^version\.plist$</key>
136
+ <dict>
137
+ <key>weight</key>
138
+ <real>20</real>
139
+ </dict>
140
+ </dict>
141
+ </dict>
142
+ </plist>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqliteai/sqlite-sync-expo",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "SQLite Sync extension for Expo - Sync on-device databases with SQLite Cloud",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",