pub struct ProjectionEngine<T: KeyValueStore> { /* private fields */ }Expand description
Main projection engine with generic KeyValueStore backend
Implementations§
Source§impl<T: KeyValueStore + 'static> ProjectionEngine<T>
impl<T: KeyValueStore + 'static> ProjectionEngine<T>
Sourcepub fn new(config: ProjectionConfig, storage: Arc<T>) -> Self
pub fn new(config: ProjectionConfig, storage: Arc<T>) -> Self
Create a new projection engine with the given KeyValueStore backend
Source§impl<T: KeyValueStore + 'static> ProjectionEngine<T>
impl<T: KeyValueStore + 'static> ProjectionEngine<T>
Sourcepub async fn create_projection(
&self,
name: String,
definition: ProjectionDefinition,
) -> Result<()>
pub async fn create_projection( &self, name: String, definition: ProjectionDefinition, ) -> Result<()>
Create a new projection
Sourcepub async fn delete_projection(&self, name: &str) -> Result<()>
pub async fn delete_projection(&self, name: &str) -> Result<()>
Delete a projection
Sourcepub async fn get_projection_status(
&self,
name: &str,
) -> Result<Option<ProjectionState>>
pub async fn get_projection_status( &self, name: &str, ) -> Result<Option<ProjectionState>>
Get projection status
Sourcepub async fn list_projections(&self) -> Vec<String>
pub async fn list_projections(&self) -> Vec<String>
List all projections
Sourcepub async fn process_ocel_events(&self, events: Vec<OcelEvent>) -> Result<()>
pub async fn process_ocel_events(&self, events: Vec<OcelEvent>) -> Result<()>
Process a batch of OCEL events
Sourcepub async fn process_events(&self, events: Vec<EventEnvelope>) -> Result<()>
pub async fn process_events(&self, events: Vec<EventEnvelope>) -> Result<()>
Process a batch of events (legacy method)
Sourcepub async fn query_projections(&self, query: Value) -> Result<Value>
pub async fn query_projections(&self, query: Value) -> Result<Value>
Query projections using storage backend
Sourcepub async fn query_view(
&self,
projection_name: &str,
query: ViewQuery,
) -> Result<ViewResult>
pub async fn query_view( &self, projection_name: &str, query: ViewQuery, ) -> Result<ViewResult>
Query a materialized view (legacy method)
Sourcepub async fn get_statistics(&self) -> EngineStatistics
pub async fn get_statistics(&self) -> EngineStatistics
Get engine statistics
Trait Implementations§
Source§impl<T: KeyValueStore> Clone for ProjectionEngine<T>
impl<T: KeyValueStore> Clone for ProjectionEngine<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ProjectionEngine<T>
impl<T> !UnwindSafe for ProjectionEngine<T>
impl<T> Freeze for ProjectionEngine<T>
impl<T> Send for ProjectionEngine<T>
impl<T> Sync for ProjectionEngine<T>
impl<T> Unpin for ProjectionEngine<T>
impl<T> UnsafeUnpin for ProjectionEngine<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more