MethodFunction

Trait MethodFunction 

Source
pub trait MethodFunction: SqlFunction {
    // Required methods
    fn handles_method(&self, method_name: &str) -> bool;
    fn method_name(&self) -> &'static str;

    // Provided method
    fn evaluate_method(
        &self,
        receiver: &DataValue,
        args: &[DataValue],
    ) -> Result<DataValue> { ... }
}
Expand description

Trait for method-style functions that operate on a column/value These are called with dot notation: column.Method(args)

Required Methods§

Source

fn handles_method(&self, method_name: &str) -> bool

Check if this method function handles the given method name

Source

fn method_name(&self) -> &'static str

Get the method name this function handles

Provided Methods§

Source

fn evaluate_method( &self, receiver: &DataValue, args: &[DataValue], ) -> Result<DataValue>

Evaluate as a method (first arg is implicit ‘self’)

Implementors§