Skip to main content

TableFunction

Trait TableFunction 

Source
pub trait TableFunction:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &str;
    fn execute(
        &self,
        args: &[Value],
    ) -> Result<Vec<Vec<Value>>, ExpressionError>;
    fn description(&self) -> &str;
}
Expand description

Table function trait for functions that return rows of data.

Unlike scalar functions that return a single Value, table functions return multiple rows, each row being a Vec<Value>.

Required Methods§

Source

fn name(&self) -> &str

Function name

Source

fn execute(&self, args: &[Value]) -> Result<Vec<Vec<Value>>, ExpressionError>

Execute the table function with the given arguments. Returns a vector of rows, where each row is a vector of values.

Source

fn description(&self) -> &str

Function description

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§