Skip to main content

NullProbeRow

Trait NullProbeRow 

Source
pub trait NullProbeRow<Row: ?Sized>: FromDrizzleRow<Row> {
    // Required method
    fn is_null_at(row: &Row, offset: usize) -> Result<bool, DrizzleError>;
}
Expand description

Trait for composite (multi-column) row types that support NULL probing.

Implementing this trait enables Option<T> to work as a FromDrizzleRow target, used for LEFT JOIN results where the joined table may be absent (all columns NULL).

Proc macros generate this for each SelectModel. Leaf types (i32, String, etc.) use concrete Option<T> impls instead.

Required Methods§

Source

fn is_null_at(row: &Row, offset: usize) -> Result<bool, DrizzleError>

Returns true if the first column at offset is NULL.

§Errors

Returns an error if the row cannot be inspected at offset (e.g. the driver reports an out-of-range index or conversion failure).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§