Expand description
Scalar functions, CASE and date-part extraction.
ⓘ
use siderite_orm::functions::*;
User::objects(&db)
.filter(lower(User::name.expr()).eq("ann"))
.annotate("label", coalesce([User::nick.expr(), User::name.expr()]))Structs§
- Case
Builder - Builder for
Expr::Case.
Enums§
- Date
Part - Component extracted by
Expr::date_part. - Function
- Scalar functions with the same meaning on every relational backend.
Functions§
- case
- Start a searched
CASE:case().when(cond, then).otherwise(fallback). - cast
CAST(expr AS ty).- coalesce
- First non-
NULLofexprs. - concat
- Concatenate text expressions (
NULLcounts as empty text). - length
- Length of
exprin characters. - lower
LOWER(expr).- replace
- Replace every
frominexprbyto. - substr
SUBSTR(expr, start, length)with a 1-basedstart.- trim
- Strip leading and trailing spaces.
- upper
UPPER(expr).