Skip to main content

upper

Function upper 

Source
pub fn upper<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Text, E::Nullable, E::Aggregate, E::Sources>
where V: SQLParam + 'a, E: Expr<'a, V>, E::SQLType: Textual,
Expand description

Converts text to upper case (UPPER).

The argument must be text. The result is text and keeps the argument’s nullability.

§Examples

assert_eq!(upper(users.name).sql(), r#"UPPER ("users"."name")"#);

§Type safety

UPPER of an integer column does not compile:

ⓘ
let wrong = upper(users.id);