Skip to main content

Row

Trait Row 

Source
pub trait Row {
    // Required method
    fn get(&self, field: &FieldRef) -> Option<Value>;
}
Expand description

Pluggable row-binding lookup. The evaluator stays agnostic of whether the caller has a slot vector indexed by planner-assigned position, a flat HashMap<String, Value>, or a graph binding — every consumer just provides a Row impl that resolves a FieldRef to a Value.

Required Methods§

Source

fn get(&self, field: &FieldRef) -> Option<Value>

Resolve a column / property reference. Returns None when the reference is unknown (the evaluator surfaces this as EvalError::UnknownColumn) or Some(Value::Null) when the column exists but the row’s value is null.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> Row for F
where F: Fn(&FieldRef) -> Option<Value>,

Trivial Row impl over a flat (table, column) -> Value closure — useful for tests and for callers that only have a column-name map.