aerogramme/src/storage/in_memory.rs

94 lines
1.9 KiB
Rust
Raw Normal View History

2023-11-02 09:45:41 +00:00
use futures::FutureExt;
2023-11-01 14:15:57 +00:00
use crate::storage::*;
#[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-17 09:46:13 +00:00
#[derive(Clone, Debug)]
pub struct MemOrphanRowRef {}
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!();
}
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!();
}
fn select(&self, selector: Selector) -> AsyncResult<Vec<RowValue>> {
unimplemented!();
}
fn rm(&self, selector: Selector) -> AsyncResult<()> {
unimplemented!();
}
2023-11-17 09:46:13 +00:00
2023-11-17 14:02:43 +00:00
fn from_orphan(&self, orphan: OrphanRowRef) -> Result<RowRef, StorageError> {
2023-11-17 09:46:13 +00:00
unimplemented!();
}
2023-11-01 14:15:57 +00:00
}
2023-11-02 08:57:58 +00:00
impl IRowRef for MemRef {
2023-11-17 09:46:13 +00:00
fn to_orphan(&self) -> OrphanRowRef {
unimplemented!()
}
fn key(&self) -> (&str, &str) {
unimplemented!();
}
2023-11-17 09:46:13 +00:00
/*fn clone_boxed(&self) -> RowRef {
2023-11-02 14:28:19 +00:00
unimplemented!();
2023-11-17 09:46:13 +00:00
}*/
2023-11-02 14:28:19 +00:00
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-17 11:15:44 +00:00
impl std::fmt::Debug for MemRef {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
unimplemented!();
}
}
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!();
}
}