pub trait IDatabase: Send + Sync {
fn contains(&self, id: &str) -> bool;
fn get(&mut self, id: &str, rec_id: usize) -> Vec<u8>;
fn post(&mut self, id: &str, value: &[u8]);
fn get_meta(&mut self, id: &str) -> Vec<u8>;
fn post_meta(&mut self, id: &str, value: Vec<u8>);
fn get_aggregates(&self, id: &str) -> Vec<u8>;
fn get_latest(&mut self, id: &str) -> Vec<u8>;
fn get_latest_with_limit(&mut self, id: &str, limit: usize) -> Vec<Vec<u8>>;
fn get_range(&mut self, id: &str, start: usize, end: usize) -> Vec<Vec<u8>>;
fn get_all_meta(&mut self) -> std::collections::HashMap<&str, Vec<u8>>;
fn get_all_aggregates(&self) -> std::collections::HashMap<&str, Vec<u8>>;
fn get_all_latest(&mut self) -> std::collections::HashMap<&str, Vec<u8>>;
fn get_all_latest_with_limit(
&mut self,
limit: usize,
) -> std::collections::HashMap<&str, Vec<Vec<u8>>>;
}