2023-11-02 09:45:41 +00:00
|
|
|
use futures::FutureExt;
|
2023-11-01 14:15:57 +00:00
|
|
|
use crate::storage::*;
|
|
|
|
|
2023-11-02 11:18:43 +00:00
|
|
|
#[derive(Clone, Debug, Hash)]
|
2023-11-02 10:51:03 +00:00
|
|
|
pub struct FullMem {}
|
2023-11-01 14:15:57 +00:00
|
|
|
pub struct MemStore {}
|
|
|
|
pub struct MemRef {}
|
|
|
|
pub struct MemValue {}
|
|
|
|
|
2023-11-02 11:18:43 +00:00
|
|
|
impl IBuilders for FullMem {
|
2023-11-02 10:51:03 +00:00
|
|
|
fn row_store(&self) -> Result<RowStore, StorageError> {
|
|
|
|
unimplemented!();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn blob_store(&self) -> Result<BlobStore, StorageError> {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
2023-11-02 11:18:43 +00:00
|
|
|
|
|
|
|
fn url(&self) -> &str {
|
|
|
|
return "mem://unimplemented;"
|
|
|
|
}
|
2023-11-01 14:15:57 +00:00
|
|
|
}
|
|
|
|
|
2023-11-02 08:57:58 +00:00
|
|
|
impl IRowStore for MemStore {
|
2023-11-02 11:58:45 +00:00
|
|
|
fn row(&self, partition: &str, sort: &str) -> RowRef {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-02 08:57:58 +00:00
|
|
|
impl IRowRef for MemRef {
|
2023-11-02 14:28:19 +00:00
|
|
|
fn clone_boxed(&self) -> RowRef {
|
|
|
|
unimplemented!();
|
|
|
|
}
|
|
|
|
|
2023-11-02 09:38:47 +00:00
|
|
|
fn set_value(&self, content: Vec<u8>) -> RowValue {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
2023-11-02 09:38:47 +00:00
|
|
|
fn fetch(&self) -> AsyncResult<RowValue> {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
2023-11-02 09:38:47 +00:00
|
|
|
fn rm(&self) -> AsyncResult<()> {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
2023-11-02 14:28:19 +00:00
|
|
|
fn poll(&self) -> AsyncResult<RowValue> {
|
2023-11-02 09:45:41 +00:00
|
|
|
async {
|
2023-11-02 14:28:19 +00:00
|
|
|
let rv: RowValue = Box::new(MemValue{});
|
|
|
|
Ok(rv)
|
2023-11-02 09:45:41 +00:00
|
|
|
}.boxed()
|
2023-11-01 14:15:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-02 08:57:58 +00:00
|
|
|
impl IRowValue for MemValue {
|
2023-11-02 09:38:47 +00:00
|
|
|
fn to_ref(&self) -> RowRef {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
|
|
|
fn content(&self) -> ConcurrentValues {
|
|
|
|
unimplemented!();
|
|
|
|
}
|
2023-11-02 09:38:47 +00:00
|
|
|
fn push(&self) -> AsyncResult<()> {
|
2023-11-01 14:15:57 +00:00
|
|
|
unimplemented!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|