Skip to main content

WorkflowSql

Trait WorkflowSql 

Source
pub trait WorkflowSql {
    // Required methods
    fn execute(&self, sql: &str, bindings: &[Value]) -> Result<usize, String>;
    fn query(
        &self,
        sql: &str,
        bindings: &[Value],
    ) -> Result<Vec<Vec<Value>>, String>;
    fn execute_batch(&self, sql: &str) -> Result<(), String>;
}
Expand description

Synchronous SQL operations; callbacks must never yield to another request.

Required Methods§

Source

fn execute(&self, sql: &str, bindings: &[Value]) -> Result<usize, String>

Executes a statement and returns the number of changed rows.

Source

fn query( &self, sql: &str, bindings: &[Value], ) -> Result<Vec<Vec<Value>>, String>

Returns positional column values, preserving SQL nulls and integer values.

Source

fn execute_batch(&self, sql: &str) -> Result<(), String>

Executes schema statements, without changing the host’s durability settings.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§