aboutsummaryrefslogtreecommitdiff
path: root/src/storage/mod.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-12-27 14:58:09 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-12-27 14:58:09 +0100
commit54c9736a247bb3534a285caa637c9afb052bc2dd (patch)
tree91efb131a2f2bb65ec07a202031927d476f78e09 /src/storage/mod.rs
parent477a784e45d07d414fea77cf5b49ee241dc01f65 (diff)
downloadaerogramme-54c9736a247bb3534a285caa637c9afb052bc2dd.tar.gz
aerogramme-54c9736a247bb3534a285caa637c9afb052bc2dd.zip
implemente garage storage
Diffstat (limited to 'src/storage/mod.rs')
-rw-r--r--src/storage/mod.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/storage/mod.rs b/src/storage/mod.rs
index 1b1faad..c81ffe4 100644
--- a/src/storage/mod.rs
+++ b/src/storage/mod.rs
@@ -90,11 +90,6 @@ impl RowVal {
#[derive(Debug, Clone)]
pub struct BlobRef(pub String);
-impl BlobRef {
- pub fn new(key: &str) -> Self {
- Self(key.to_string())
- }
-}
impl std::fmt::Display for BlobRef {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BlobRef({})", self.0)
@@ -125,6 +120,7 @@ impl BlobVal {
pub enum Selector<'a> {
Range { shard: &'a str, sort_begin: &'a str, sort_end: &'a str },
List (Vec<RowRef>), // list of (shard_key, sort_key)
+ #[allow(dead_code)]
Prefix { shard: &'a str, sort_prefix: &'a str },
Single(&'a RowRef),
}
@@ -143,7 +139,6 @@ impl<'a> std::fmt::Display for 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>;