Skip to main content

BuilderDelegate

Trait BuilderDelegate 

Source
pub trait BuilderDelegate {
    // Required method
    fn get_source(&self, table_name: &str) -> Option<Rc<dyn Source>>;

    // Provided methods
    fn apply_filters_anyway(&self) -> bool { ... }
    fn enable_not_exists(&self) -> bool { ... }
    fn disable_correlated_predicate_pushdown(&self) -> bool { ... }
    fn map_ast(&self, ast: &Ast) -> Ast { ... }
    fn aggregates_from_source(&self) -> bool { ... }
    fn get_aggregate_source(
        &self,
        name: &str,
        _columns: OrderedMap<Column>,
        _primary_key: Vec<String>,
        _optimistic: Option<OptimisticAggregate>,
    ) -> Option<Rc<dyn Source>> { ... }
    fn aggregate_key_columns(
        &self,
        _table: &str,
        columns: &[String],
    ) -> Vec<String> { ... }
    fn decorate_source_input(
        &self,
        input: Rc<dyn SourceInput>,
        _query_id: &str,
    ) -> Rc<dyn Input> { ... }
}
Expand description

Connects a pipeline being built to its environment (BuilderDelegate).

Required Methods§

Source

fn get_source(&self, table_name: &str) -> Option<Rc<dyn Source>>

Provided Methods§

Source

fn apply_filters_anyway(&self) -> bool

Apply where filters even when the source applies them all.

Source

fn enable_not_exists(&self) -> bool

Allow NOT EXISTS. Only the server does: a client cannot tell a row that does not exist from one that is not synced.

Source

fn disable_correlated_predicate_pushdown(&self) -> bool

Do not copy a parent’s conditions on correlation columns into its subqueries.

Source

fn map_ast(&self, ast: &Ast) -> Ast

Source

fn aggregates_from_source(&self) -> bool

The synced client’s mode: an aggregate or a grouping is read from the synthetic source the server streams its rows to, rather than computed from rows the client doesn’t have.

Source

fn get_aggregate_source( &self, name: &str, _columns: OrderedMap<Column>, _primary_key: Vec<String>, _optimistic: Option<OptimisticAggregate>, ) -> Option<Rc<dyn Source>>

The source of a relationship aggregate’s or a grouped query’s rows, which the name doesn’t describe, made with this shape if it’s new. optimistic lets the client move it when it writes a child row.

Source

fn aggregate_key_columns(&self, _table: &str, columns: &[String]) -> Vec<String>

The names a synced aggregate row has table’s columns under: the server’s, which it computed them with.

Source

fn decorate_source_input( &self, input: Rc<dyn SourceInput>, _query_id: &str, ) -> Rc<dyn Input>

Wraps each source connection of query query_id’s pipeline (decorateSourceInput), as the client does to time its pushes.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§