replace separate sqlite dependency with async sqlx-sqlite, adapt usages #2920
+262
−191
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.
I'm starting on some refactoring tasks to make many thing more readable and easier to manage.
rusqlite
became annoying to manage becausesqlx
&rusqlite
want to link to different versions of the sqlite library.The really cool features that
rusqlite
has are unused by us, and we don't need them in the near future.Like this we can use the same (
sqlx
) way of doing things with the archive index.On top of that this also some methods async, though in case of
sqlx-sqlite
it doesn't make a real difference because sqlx uses a background thread and then still has to do the syncronous sqlite FFI. And I would say that there is not really a big difference between its own background thread, or tokio'sspawn_blocking
.While I was on it I used the sqlx
QueryBuilder
to batch theINSERT
statements when we create the index.