pub trait SqlFunction: Send + Sync {
// Required methods
fn signature(&self) -> FunctionSignature;
fn evaluate(&self, args: &[DataValue]) -> Result<DataValue>;
// Provided method
fn validate_args(&self, args: &[DataValue]) -> Result<()> { ... }
}
Expand description
Trait that all SQL functions must implement
Required Methods§
Sourcefn signature(&self) -> FunctionSignature
fn signature(&self) -> FunctionSignature
Get the function’s signature and metadata
Provided Methods§
Sourcefn validate_args(&self, args: &[DataValue]) -> Result<()>
fn validate_args(&self, args: &[DataValue]) -> Result<()>
Validate arguments before evaluation (default implementation checks count)