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 method
    fn try_stream<'db>(
        &self,
        _db: &'db Database,
        _schema: &SchemaManager,
        _stmt: &Statement,
        _params: &[Value],
    ) -> Option<Box<dyn RowSourceIter + 'db>> { ... }
}

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.

Implementors§