Skip to main content

StatementCache

Trait StatementCache 

Source
pub trait StatementCache {
    // Required methods
    fn cached_sql_statement(&self, sql: &str) -> Option<CachedStatement>;
    fn cache_sql_statement(
        &self,
        sql: &str,
        statement: Arc<Statement>,
        logical_plan: Option<SharedExecutablePlan>,
        parser: ParserMetadata,
        control: &ProductionControl<'_>,
    ) -> Result<(), SQLError>;
    fn cache_optimized_sql_plan(
        &self,
        sql: &str,
        optimized_plan: SharedExecutablePlan,
        control: &ProductionControl<'_>,
    ) -> Result<(), SQLError>;

    // Provided methods
    fn retire_sql_logical_plan(
        &self,
        _sql: &str,
        _control: &ProductionControl<'_>,
    ) -> Result<(), SQLError> { ... }
    fn cached_sql_analysis(&self, _sql: &str) -> Option<AnalyzedStatement> { ... }
    fn cache_sql_analysis(
        &self,
        _sql: &str,
        _analysis: Option<AnalyzedStatement>,
        _control: &ProductionControl<'_>,
    ) -> Result<(), SQLError> { ... }
}

Required Methods§

Source

fn cached_sql_statement(&self, sql: &str) -> Option<CachedStatement>

Source

fn cache_sql_statement( &self, sql: &str, statement: Arc<Statement>, logical_plan: Option<SharedExecutablePlan>, parser: ParserMetadata, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source

fn cache_optimized_sql_plan( &self, sql: &str, optimized_plan: SharedExecutablePlan, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Provided Methods§

Source

fn retire_sql_logical_plan( &self, _sql: &str, _control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Retire the preliminary executable once planning owns its input. Parsed syntax and matching analyzed inputs remain available for subsequent invocations.

Source

fn cached_sql_analysis(&self, _sql: &str) -> Option<AnalyzedStatement>

Look up analysis after the statement’s snapshot and writer refreshes, with current catalog and scope validation. Ordinary cache implementations may decline this capability.

Source

fn cache_sql_analysis( &self, _sql: &str, _analysis: Option<AnalyzedStatement>, _control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§