[][src]Trait clepsydra::Lang

pub trait Lang: DefTraits + 'static {
    type Key: DefTraits + Send + Sync;
    type Val: DefTraits + Send + Sync;
    type Stmt: DefTraits + Send + Sync;
    type Expr: DefTraits + Send + Sync;
    pub fn get_write_set(s: &Self::Stmt) -> BTreeMap<Self::Key, Self::Expr>;
pub fn get_read_set(e: &Self::Expr) -> BTreeSet<Self::Key>;
pub fn get_eval_set(s: &Self::Stmt) -> BTreeSet<Self::Key>;
pub fn eval_expr(
        e: &Self::Expr,
        vals: &[Self::Val],
        env: &BTreeMap<Self::Key, ExtVal<Self>>
    ) -> ExtVal<Self>; }

A Lang provides a skeletal interface between the database and a given client's query language. Clients of this crate need to define a Lang that models their language at least enough that the database can call it back to extract key-sets and perform (deterministic) evaluation.

Associated Types

Loading content...

Required methods

pub fn get_write_set(s: &Self::Stmt) -> BTreeMap<Self::Key, Self::Expr>[src]

pub fn get_read_set(e: &Self::Expr) -> BTreeSet<Self::Key>[src]

pub fn get_eval_set(s: &Self::Stmt) -> BTreeSet<Self::Key>[src]

pub fn eval_expr(
    e: &Self::Expr,
    vals: &[Self::Val],
    env: &BTreeMap<Self::Key, ExtVal<Self>>
) -> ExtVal<Self>
[src]

Loading content...

Implementors

Loading content...