File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,17 @@ pub fn next_db_version(
66
66
if let Some ( merging_version) = merging_version {
67
67
if ret < merging_version {
68
68
ret = merging_version;
69
+ } else if ret > merging_version {
70
+ // if merging_version has never been seen before
71
+ // in this current transaction against `crsql_changes`
72
+ // we need to bump ret
73
+ // We can accomplish this by:
74
+ // 1. Installing a `xBegin` callback on `crsql_changes` which indicates we are writing there
75
+ // 2. Install `xCommit` and `xRollback` callbacks on `crsql_changes` indicating we are done writing there
76
+ // 3. Adding a Vec of `db_versions` to extData
77
+ // 4. Binary search this vec for the current merging_version
78
+ // 5. If not there, add it and bump ret.
79
+ // 6. If there, do nothing.
69
80
}
70
81
}
71
82
unsafe {
You can’t perform that action at this time.
0 commit comments