Skip to main content

StoreStrategy

Trait StoreStrategy 

Source
pub trait StoreStrategy: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn indexes(&self) -> &[IndexType];
    fn index_on_add(&self) -> bool;
    fn select_index(&self, pattern: PatternType) -> IndexType;
    fn estimate_cost(&self, pattern: PatternType) -> f64;
}
Expand description

Store strategy trait

Required Methods§

Source

fn name(&self) -> &str

Get strategy name

Source

fn indexes(&self) -> &[IndexType]

Get indexes to maintain

Source

fn index_on_add(&self) -> bool

Should index on add?

Source

fn select_index(&self, pattern: PatternType) -> IndexType

Select best index for pattern

Source

fn estimate_cost(&self, pattern: PatternType) -> f64

Get estimated cost for pattern with this strategy

Implementors§