Skip to main content

Module functions

Module functions 

Source
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§

CaseBuilder
Builder for Expr::Case.

Enums§

DatePart
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-NULL of exprs.
concat
Concatenate text expressions (NULL counts as empty text).
length
Length of expr in characters.
lower
LOWER(expr).
replace
Replace every from in expr by to.
substr
SUBSTR(expr, start, length) with a 1-based start.
trim
Strip leading and trailing spaces.
upper
UPPER(expr).