Skip to main content

cast

Function cast 

Source
pub fn cast(
    expr: impl IntoExpr,
    type_name: impl Into<Cow<'static, str>>,
) -> Expr
Expand description

CAST(expr AS type_name).

Unlike bob’s builder method this does not add outer parentheses: CAST(..) is already self-delimiting, so they would be pure noise. Wrap it in group if you want them.