reifydb_core/interface/
engine.rs

1use crate::{
2	interface::{CommandTransaction, Identity, Params, QueryTransaction, WithEventBus},
3	value::frame::Frame,
4};
5
6pub trait Engine: WithEventBus + Send + Sync + Clone + 'static {
7	type Command: CommandTransaction;
8	type Query: QueryTransaction;
9
10	fn begin_command(&self) -> crate::Result<Self::Command>;
11
12	fn begin_query(&self) -> crate::Result<Self::Query>;
13
14	fn command_as(&self, identity: &Identity, rql: &str, params: Params) -> crate::Result<Vec<Frame>>;
15
16	fn query_as(&self, identity: &Identity, rql: &str, params: Params) -> crate::Result<Vec<Frame>>;
17}