Skip to main content

QueryExpressionFactory

Trait QueryExpressionFactory 

Source
pub trait QueryExpressionFactory<S: Clone + 'static>: Sync {
    // Required methods
    fn production_resources(&self) -> Result<OwnedProductionControl, SQLError>;
    fn bind_scope(
        &self,
        scope: &CteScope<S>,
    ) -> Result<Arc<dyn SetFunctionRuntime + '_>, SQLError>;
    fn optimize_catalog_scalar(
        &self,
        expression: &mut ScalarExpr,
    ) -> Result<(), SQLError>;
    fn optimize_owned_catalog_scalar(
        &self,
        expression: OwnedScalarExpr,
        control: &ProductionControl<'_>,
    ) -> Result<OwnedScalarExpr, SQLError>;
    fn prepare_predicate<'a>(
        &'a self,
        expression: &ScalarExpr,
        params: &'a [SQLParam],
        scope: &CteScope<S>,
    ) -> Result<Option<SharedRowPredicate<'a>>, SQLError>;
}
Expand description

Bind scoped expression services without exposing the owning session or storage state.

Required Methods§

Source

fn production_resources(&self) -> Result<OwnedProductionControl, SQLError>

Source

fn bind_scope( &self, scope: &CteScope<S>, ) -> Result<Arc<dyn SetFunctionRuntime + '_>, SQLError>

Source

fn optimize_catalog_scalar( &self, expression: &mut ScalarExpr, ) -> Result<(), SQLError>

Apply the owning planner to a validated schema/procedural execution copy.

Source

fn optimize_owned_catalog_scalar( &self, expression: OwnedScalarExpr, control: &ProductionControl<'_>, ) -> Result<OwnedScalarExpr, SQLError>

Source

fn prepare_predicate<'a>( &'a self, expression: &ScalarExpr, params: &'a [SQLParam], scope: &CteScope<S>, ) -> Result<Option<SharedRowPredicate<'a>>, SQLError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§