Skip to main content

CompiledPlan

Trait CompiledPlan 

Source
pub trait CompiledPlan: Send + Sync {
    // Required method
    fn execute(
        &self,
        db: &Database,
        schema: &SchemaManager,
        stmt: &Statement,
        params: &[Value],
        wtx: Option<&mut WriteTxn<'_>>,
    ) -> Result<ExecutionResult>;

    // Provided methods
    fn try_stream<'db>(
        &self,
        _db: &'db Database,
        _schema: &SchemaManager,
        _stmt: &Statement,
        _params: &[Value],
    ) -> Option<Box<dyn RowSourceIter + 'db>> { ... }
    fn uses_scoped_params(&self) -> bool { ... }
}

Required Methods§

Source

fn execute( &self, db: &Database, schema: &SchemaManager, stmt: &Statement, params: &[Value], wtx: Option<&mut WriteTxn<'_>>, ) -> Result<ExecutionResult>

Provided Methods§

Source

fn try_stream<'db>( &self, _db: &'db Database, _schema: &SchemaManager, _stmt: &Statement, _params: &[Value], ) -> Option<Box<dyn RowSourceIter + 'db>>

Attempt to produce a streaming row source. Returns None if this plan cannot stream the given statement — caller falls back to execute.

Source

fn uses_scoped_params(&self) -> bool

false when execute reads params directly without resolve_scoped_param, letting the caller skip with_scoped_params.

Implementors§