Repository navigation
chore: adaptations to the internals API following migration to SQLite - #20
Merged
Merged
Conversation
Author
|
For context, the changes I am making on the iOS side: pixelspark/sushitrain@main...chore/sqlite |
calmh
reviewed
Mar 15, 2025
calmh
reviewed
Mar 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @calmh, great work on the SQLite backend!
I spent the morning getting the Synctrain iOS app to build with this branch as well, and as expected there were some minor things to fix. This PR contains all the fixes currently needed:
internals.DBSnapshot()(which is a good move I think), I added two new functions to obtain the required statistics (LocalSizeandNeedSize). Due to theCountstype now being moved tointernalsI have added a proxy type here so the internaldb.Countscan be left unexposed.internals.DBSnapshot(), it cannot be used anymore to iterate over the global list of files. Therefore I added a functionAllGlobalFilesto expose the equally named function fromModelto iterate over files.syncthing.Newfrom the iOS side, I need a way to instantiate the newsdband of course would like a way to trigger the migration as well. I therefore created a functionutils.OpenDatabasethat does this (before my change the code for migrating and upgrading was a bit intermingled - I don't need to/can't do auto-upgrading so I left this unexposed).Everything seems to work fine, but I need to do further testing obviously.
I think it would be great if you could already in this early stage incorporate these changes. This would allow me to track the progress on the SQLite migration and ensure the iOS app is ready as well whenever v2.0.0 is.