pub fn parser_expr_to_scalar_value_literal(
expr: Expr,
require_now_expr: bool,
) -> Result<ScalarValue>
Expand description
Convert a parser expression to a scalar value. This function will try the
best to resolve and reduce constants. Exprs like 1 + 1
or now()
can be
handled properly.
if require_now_expr
is true, it will ensure that the expression contains a now()
function.
If the expression does not contain now()
, it will return an error.