in-memory storage #32

Merged
quentin merged 65 commits from in-memory into main 2023-12-27 16:35:43 +00:00
4 changed files with 6 additions and 6 deletions
Showing only changes of commit 1f28832dea - Show all commits

View file

@ -109,8 +109,8 @@ impl Region {
impl Credentials { impl Credentials {
pub fn k2v_client(&self) -> Result<K2vClient> { pub fn k2v_client(&self) -> Result<RowStore, Error> {
self.storage.k2v_client() self.storage.row.row_store()
} }
pub fn s3_client(&self) -> Result<S3Client> { pub fn s3_client(&self) -> Result<S3Client> {
self.storage.s3_client() self.storage.s3_client()

View file

@ -7,7 +7,7 @@ pub struct GrgRef {}
pub struct GrgValue {} pub struct GrgValue {}
impl IRowBuilder for GrgCreds { impl IRowBuilder for GrgCreds {
fn row_store(&self) -> RowStore { fn row_store(&self) -> Result<RowStore, Error> {
unimplemented!(); unimplemented!();
} }
} }

View file

@ -8,7 +8,7 @@ pub struct MemRef {}
pub struct MemValue {} pub struct MemValue {}
impl IRowBuilder for MemCreds { impl IRowBuilder for MemCreds {
fn row_store(&self) -> RowStore { fn row_store(&self) -> Result<RowStore, Error> {
unimplemented!(); unimplemented!();
} }
} }

View file

@ -54,7 +54,7 @@ pub type AsyncResult<'a, T> = BoxFuture<'a, Result<T, Error>>;
// ------ Row Builder // ------ Row Builder
pub trait IRowBuilder pub trait IRowBuilder
{ {
fn row_store(&self) -> RowStore; fn row_store(&self) -> Result<RowStore, Error>;
} }
pub type RowBuilder = Box<dyn IRowBuilder + Send + Sync>; pub type RowBuilder = Box<dyn IRowBuilder + Send + Sync>;
@ -63,7 +63,7 @@ pub trait IRowStore
{ {
fn new_row(&self, partition: &str, sort: &str) -> RowRef; fn new_row(&self, partition: &str, sort: &str) -> RowRef;
} }
type RowStore = Box<dyn IRowStore>; pub type RowStore = Box<dyn IRowStore>;
// ------- Row Item // ------- Row Item
pub trait IRowRef pub trait IRowRef