Replace JSON file as a database with SQLite #248

Closed
opened 2025-01-03 21:01:44 +01:00 by wojtek · 5 comments
Owner

Most common Rust crate for this seems to be https://crates.io/crates/rusqlite.

Most common Rust crate for this seems to be https://crates.io/crates/rusqlite.
wojtek added this to the v1.0.0-alpha.1 milestone 2025-01-03 21:01:44 +01:00
wojtek added the
enabler
label 2025-01-03 21:01:44 +01:00
wojtek added this to the Album tracking project 2025-01-03 21:01:44 +01:00
Author
Owner

If possible use this to make multiple sequential calls to the database atomic.

If possible use this to make multiple sequential calls to the database atomic.
wojtek removed this from the v1.0.0-alpha.1 milestone 2025-01-04 10:56:36 +01:00
wojtek added this to the v1.0.0-beta.1 milestone 2025-01-04 10:56:46 +01:00
wojtek removed this from the Album tracking project 2025-01-04 10:56:48 +01:00
Author
Owner

Not needed for alpha. Move to beta because having a proper database will make out-of-band updates much much easier.

Not needed for alpha. Move to beta because having a proper database will make out-of-band updates much much easier.
Author
Owner

Though this will make having the DB in a remote location rather impossible (#64)

Though this will make having the DB in a remote location rather impossible (#64)
wojtek added this to the Beta release project 2025-01-05 16:06:17 +01:00
Author
Owner

With this also remove the musichoard-edit binary. Whilst it's not really the same most use cases for edit can be met with other features that have been added to musichoard and what hasn't can probably be done by manual database modification.

With this also remove the musichoard-edit binary. Whilst it's not really the same most use cases for edit can be met with other features that have been added to musichoard and what hasn't can probably be done by manual database modification.
Author
Owner

Do this over multiple merge requests:

  1. Add SQLite with identical functionality as the JSON database - the same unit tests must pass. #265
  2. Remove musichoard-edit binary. #266
  3. Remove the JSON database. Don't want to support both in light of the upcoming updates. Don't forget to convert the DB that's in use to SQLite. #267
  4. Refactor the IDatabase calls to write directly to DB. Figure out if it makes sense to update in-memory then write or write then read from DB. Most likely the best solution has no database cache in memory and all database access is via the actual DB. To be followed up in #268
Do this over multiple merge requests: 1. ~Add SQLite with identical functionality as the JSON database - the same unit tests must pass.~ #265 2. ~Remove musichoard-edit binary.~ #266 3. ~Remove the JSON database. Don't want to support both in light of the upcoming updates. Don't forget to convert the DB that's in use to SQLite.~ #267 4. ~Refactor the IDatabase calls to write directly to DB. Figure out if it makes sense to update in-memory then write or write then read from DB. Most likely the best solution has no database cache in memory and all database access is via the actual DB.~ To be followed up in #268
wojtek added reference 248---replace-json-file-as-a-database-with-sqlite 2025-01-08 21:18:59 +01:00
wojtek moved this to In Progress in Beta release on 2025-01-12 12:17:11 +01:00
wojtek referenced this issue from a commit 2025-01-12 12:18:26 +01:00
wojtek moved this to Done in Beta release on 2025-01-12 12:18:32 +01:00
Sign in to join this conversation.
No Milestone v1.0.0-beta.1
No project Beta release
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wojtek/musichoard#248
No description provided.