From 916b27d87ec7f5bff41f9dd888914d50ae067fc0 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 15 Nov 2023 15:56:43 +0100 Subject: WIP refactor storage (new timestamp.rs file) --- src/storage/garage.rs | 8 ++++++++ src/storage/in_memory.rs | 8 ++++++++ src/storage/mod.rs | 3 +-- 3 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src/storage') 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> { + 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) -> 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> { + 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; 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) -> RowValue; fn fetch(&self) -> AsyncResult; fn rm(&self) -> AsyncResult<()>; -- cgit v1.2.3