Function execute_sql

Source
pub fn execute_sql(
    db: &RelationalDB,
    sql: &str,
    ast: Vec<CrudExpr>,
    auth: AuthCtx,
    subs: Option<&ModuleSubscriptions>,
) -> Result<Vec<MemTable>, DBError>
Expand description

Run the compiled SQL expression inside the vm created by DbProgram

Evaluates ast and accordingly triggers mutable or read tx to execute

Also, in case the execution takes more than x, log it as slow query