diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-12 01:54:21 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-12 01:54:21 +0200 |
| commit | bbdf38018b47328b5faa2cef635c37095045be72 (patch) | |
| tree | 8983817d547551ae12508a8ae8731b622d990af4 /crates/turtle/src/atuin_client/history | |
| parent | feat(server): Make user stuff stateless (diff) | |
| download | atuin-bbdf38018b47328b5faa2cef635c37095045be72.zip | |
feat(server): Really make users stateless (with tests)
This commit also remove another load of unneeded features.
Diffstat (limited to 'crates/turtle/src/atuin_client/history')
| -rw-r--r-- | crates/turtle/src/atuin_client/history/store.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/turtle/src/atuin_client/history/store.rs b/crates/turtle/src/atuin_client/history/store.rs index b2265698..a8162e21 100644 --- a/crates/turtle/src/atuin_client/history/store.rs +++ b/crates/turtle/src/atuin_client/history/store.rs @@ -6,7 +6,7 @@ use rmp::decode::Bytes; use tracing::debug; use crate::atuin_client::{ - database::{Database, current_context}, + database::{ClientSqlite, current_context}, record::{encryption::PASETO_V4, sqlite_store::SqliteStore, store::Store}, }; use crate::atuin_common::record::{DecryptedData, Host, HostId, Record, RecordId, RecordIdx}; @@ -226,7 +226,7 @@ impl HistoryStore { Ok(ret) } - pub(crate) async fn build(&self, database: &dyn Database) -> Result<()> { + pub(crate) async fn build(&self, database: &ClientSqlite) -> Result<()> { // I'd like to change how we rebuild and not couple this with the database, but need to // consider the structure more deeply. This will be easy to change. @@ -258,7 +258,11 @@ impl HistoryStore { Ok(()) } - pub(crate) async fn incremental_build(&self, database: &dyn Database, ids: &[RecordId]) -> Result<()> { + pub(crate) async fn incremental_build( + &self, + database: &ClientSqlite, + ids: &[RecordId], + ) -> Result<()> { for id in ids { let record = self.store.get(*id).await; @@ -310,7 +314,7 @@ impl HistoryStore { Ok(ret) } - pub(crate) async fn init_store(&self, db: &impl Database) -> Result<()> { + pub(crate) async fn init_store(&self, db: &ClientSqlite) -> Result<()> { let pb = ProgressBar::new_spinner(); pb.set_style( ProgressStyle::with_template("{spinner:.blue} {msg}") |
