Skip to main content

cook_constant

Function cook_constant 

Source
pub fn cook_constant(
    context: &SchemaBindingContext<'_, '_>,
    expression: &mut Expr,
    target: &ColumnType,
) -> Result<bool, SQLError>
Expand description

Reduce a default that is a constant as parse analysis reduces it: an unknown literal is read by the column type’s input function and stored as a constant of that type, a cast of a literal is read by the cast’s type, and a NULL constant leaves no default. Returns whether a default remains.