Trait spacetimedb_vm::program::ProgramVm

source ·
pub trait ProgramVm {
    // Required method
    fn eval_query<const N: usize>(
        &mut self,
        query: CrudExpr,
        sources: Sources<'_, N>
    ) -> Result<Code, ErrorVm>;
}
Expand description

A trait to allow split the execution of programs to allow executing queries that take in account each program state/enviroment.

To be specific, it allows you to run queries that run on the SpacetimeDB engine.

It could also permit run queries backed by different engines, like in MySql.

Required Methods§

source

fn eval_query<const N: usize>( &mut self, query: CrudExpr, sources: Sources<'_, N> ) -> Result<Code, ErrorVm>

Allows to execute the query with the state carried by the implementation of this trait

Object Safety§

This trait is not object safe.

Implementors§