aboutsummaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-11-15 15:56:43 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-11-15 15:56:43 +0100
commit916b27d87ec7f5bff41f9dd888914d50ae067fc0 (patch)
tree68b94498bf0fed5b7abf6d4b7e4d1f2ddbbb80f4 /src/storage
parent652da6efd35f198289ba3de26b60eb2e228de73a (diff)
downloadaerogramme-916b27d87ec7f5bff41f9dd888914d50ae067fc0.tar.gz
aerogramme-916b27d87ec7f5bff41f9dd888914d50ae067fc0.zip
WIP refactor storage (new timestamp.rs file)
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/garage.rs8
-rw-r--r--src/storage/in_memory.rs8
-rw-r--r--src/storage/mod.rs3
3 files changed, 17 insertions, 2 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs
index 46da4aa..0abeb4d 100644
--- a/src/storage/garage.rs
+++ b/src/storage/garage.rs
@@ -24,6 +24,10 @@ impl IRowStore for GrgStore {
fn row(&self, partition: &str, sort: &str) -> RowRef {
unimplemented!();
}
+
+ fn select(&self, selector: Selector) -> AsyncResult<Vec<RowValue>> {
+ unimplemented!();
+ }
}
impl IRowRef for GrgRef {
@@ -31,6 +35,10 @@ impl IRowRef for GrgRef {
unimplemented!();
}
+ fn key(&self) -> (&str, &str) {
+ unimplemented!();
+ }
+
fn set_value(&self, content: Vec<u8>) -> RowValue {
unimplemented!();
}
diff --git a/src/storage/in_memory.rs b/src/storage/in_memory.rs
index 144a52f..8db4eff 100644
--- a/src/storage/in_memory.rs
+++ b/src/storage/in_memory.rs
@@ -25,9 +25,17 @@ impl IRowStore for MemStore {
fn row(&self, partition: &str, sort: &str) -> RowRef {
unimplemented!();
}
+
+ fn select(&self, selector: Selector) -> AsyncResult<Vec<RowValue>> {
+ unimplemented!();
+ }
}
impl IRowRef for MemRef {
+ fn key(&self) -> (&str, &str) {
+ unimplemented!();
+ }
+
fn clone_boxed(&self) -> RowRef {
unimplemented!();
}
diff --git a/src/storage/mod.rs b/src/storage/mod.rs
index b687959..c3bf19f 100644
--- a/src/storage/mod.rs
+++ b/src/storage/mod.rs
@@ -86,8 +86,7 @@ pub type RowStore = Box<dyn IRowStore + Sync + Send>;
pub trait IRowRef
{
fn clone_boxed(&self) -> RowRef;
- fn pk(&self) -> &str;
- fn sk(&self) -> &str;
+ fn key(&self) -> (&str, &str);
fn set_value(&self, content: Vec<u8>) -> RowValue;
fn fetch(&self) -> AsyncResult<RowValue>;
fn rm(&self) -> AsyncResult<()>;