use crate::framework::entity::i_entity::IEntity;
use crate::framework::i_query::IQuery;
use std::fmt;
use std::fmt::Debug;
use std::hash::Hash;
pub trait IFoundation {
fn do_set<K, V>(&mut self, entity: V)
where
K: std::cmp::Eq + std::hash::Hash + Clone + fmt::Debug,
V: IEntity<K> + Clone + fmt::Debug
;
fn do_set_with_id<K, V>(&mut self, id: K, entity: V)
where
K: std::cmp::Eq + std::hash::Hash + Clone + fmt::Debug,
V: IEntity<K> + Clone + fmt::Debug
;
fn do_get<K, V>(&self, id: &K) -> Option<V>
where
K: std::cmp::Eq + std::hash::Hash + Clone + fmt::Debug,
V: IEntity<K> + Clone + fmt::Debug
;
fn do_query<K, V, Q>(&self, query: &Q) -> Vec<V>
where
K: std::cmp::Eq + std::hash::Hash + Clone + fmt::Debug,
V: IEntity<K> + Clone + fmt::Debug,
Q: IQuery<K, V>
;
fn do_del<K,V>(&mut self, id: &K)
where
K: Eq + Hash + Clone + Debug,
V: IEntity<K> + Clone + Debug
;
}