Skip to main content

FoldResult

Type Alias FoldResult 

Source
pub type FoldResult = Result<Option<SqlValue>, SqlError>;
Expand description

Outcome of folding a constant expression.

Three states, kept apart on purpose: Ok(Some) folded, Ok(None) is not a constant and belongs to the row-scope evaluator, Err was a constant whose evaluation failed. Collapsing the last two loses the difference between “ask again at runtime” and “this can never succeed” — and a from-less SELECT has no runtime to ask.

Aliased Type§

pub enum FoldResult {
    Ok(Option<SqlValue>),
    Err(SqlError),
}

Variants§

§1.0.0

Ok(Option<SqlValue>)

Contains the success value

§1.0.0

Err(SqlError)

Contains the error value