aboutsummaryrefslogtreecommitdiff
path: root/src/storage/mod.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-12-19 19:02:22 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-12-19 19:02:22 +0100
commitc75f2d91ff969dd791cb476031ee80870c6ad61a (patch)
treeb8da577a6a932d82a28d29b7ab98f9cc696d4ff5 /src/storage/mod.rs
parent3d41f40dc8cd6bdfa7a9279ab1959564d06eefaf (diff)
downloadaerogramme-c75f2d91ff969dd791cb476031ee80870c6ad61a.tar.gz
aerogramme-c75f2d91ff969dd791cb476031ee80870c6ad61a.zip
implemented an in memory storage
Diffstat (limited to 'src/storage/mod.rs')
-rw-r--r--src/storage/mod.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/storage/mod.rs b/src/storage/mod.rs
index 8004ac5..a21e07d 100644
--- a/src/storage/mod.rs
+++ b/src/storage/mod.rs
@@ -61,6 +61,10 @@ impl RowRef {
causality: None,
}
}
+ pub fn with_causality(mut self, causality: String) -> Self {
+ self.causality = Some(causality);
+ self
+ }
}
#[derive(Debug, Clone)]
@@ -118,12 +122,13 @@ pub enum Selector<'a> {
pub trait IStore {
async fn row_fetch<'a>(&self, select: &Selector<'a>) -> Result<Vec<RowVal>, StorageError>;
async fn row_rm<'a>(&self, select: &Selector<'a>) -> Result<(), StorageError>;
+ async fn row_rm_single(&self, entry: &RowRef) -> Result<(), StorageError>;
async fn row_insert(&self, values: Vec<RowVal>) -> Result<(), StorageError>;
async fn row_poll(&self, value: &RowRef) -> Result<RowVal, StorageError>;
async fn blob_fetch(&self, blob_ref: &BlobRef) -> Result<BlobVal, StorageError>;
- async fn blob_insert(&self, blob_val: &BlobVal) -> Result<BlobVal, StorageError>;
- async fn blob_copy(&self, src: &BlobRef, dst: &BlobRef) -> Result<BlobVal, StorageError>;
+ async fn blob_insert(&self, blob_val: &BlobVal) -> Result<(), StorageError>;
+ async fn blob_copy(&self, src: &BlobRef, dst: &BlobRef) -> Result<(), StorageError>;
async fn blob_list(&self, prefix: &str) -> Result<Vec<BlobRef>, StorageError>;
async fn blob_rm(&self, blob_ref: &BlobRef) -> Result<(), StorageError>;
}