This repository was archived by the owner on Nov 28, 2023. It is now read-only.
Update records in SQLite via SQL instead of re-creating the database/file - #12
Merged
Merged
Conversation
ghost
approved these changes
Jul 8, 2020
joverlee521
approved these changes
Jul 8, 2020
Member
Author
|
Well, that was fast: https://twitter.com/simonw/status/1280920409219555328 (or I was slow in merging this!) I'll update this to use the official version instead of our fork. |
…file This moves the update from the filesystem layer into the SQL layer, thus allowing multiple processes to coordinate. Datasette holds open SQLite connections and was keeping references to the deleted files. The new --truncate option to `sqlite-utils insert` is added in sqlite-utils 2.11, from a PR I submitted.¹ Resolves #10. ¹ simonw/sqlite-utils#118
tsibley
force-pushed
the
update-database-in-place-alternate
branch
from
July 8, 2020 19:39
8f52e01 to
d5bd474
Compare
Member
Author
|
Deployed. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This moves the update from the filesystem layer into the SQL layer, thus
allowing multiple processes to coordinate. Datasette holds open SQLite
connections and was keeping references to the deleted files.
The new --truncate option to
sqlite-utils insertis added in a PR Isubmitted simonw/sqlite-utils#118. For now,
sqlite-utils is installed from our fork. When/if --truncate is released
officially, we can switch back to installing from PyPI.
Resolves #10.
Alternate to #11.