pub struct ContinuousQuery { /* private fields */ }Implementations§
Source§impl ContinuousQuery
impl ContinuousQuery
pub fn new( query: Arc<Query>, match_path: Arc<MatchPath>, expression_evaluator: Arc<ExpressionEvaluator>, element_index: Arc<dyn ElementIndex>, path_solver: Arc<MatchPathSolver>, part_evaluator: Arc<QueryPartEvaluator>, future_queue: Arc<dyn FutureQueue>, source_pipelines: SourceMiddlewarePipelineCollection, session_control: Arc<dyn SessionControl>, ) -> Self
pub async fn process_source_change( &self, change: SourceChange, ) -> Result<Vec<QueryPartEvaluationContext>, EvaluationError>
Sourcepub async fn process_source_change_with_hook<F, Fut>(
&self,
change: SourceChange,
pre_commit_hook: F,
) -> Result<Vec<QueryPartEvaluationContext>, EvaluationError>
pub async fn process_source_change_with_hook<F, Fut>( &self, change: SourceChange, pre_commit_hook: F, ) -> Result<Vec<QueryPartEvaluationContext>, EvaluationError>
Process a source change with a pre-commit hook that runs inside the session.
The hook executes after index updates but before the session commits, allowing callers to stage additional writes (e.g. checkpoint data) into the same atomic transaction. The change_lock is held for the entire duration, preserving serialization.
Sourcepub async fn process_due_futures(
&self,
) -> Result<Option<DueFutureResult>, EvaluationError>
pub async fn process_due_futures( &self, ) -> Result<Option<DueFutureResult>, EvaluationError>
Atomically pop a due future from the queue and process it within a single session.
Returns Ok(None) when the queue is empty (stale peek).
Returns Ok(Some(DueFutureResult)) with results and the original source_id.
Pop happens inside the session → atomic with all downstream index writes. If a crash occurs before commit, the pop rolls back and the item stays in the queue.
Sourcepub fn future_queue(&self) -> Arc<dyn FutureQueue>
pub fn future_queue(&self) -> Arc<dyn FutureQueue>
Expose the ContinuousQuery’s future queue for external polling.