Skip to main content

initcap

Function initcap 

Source
pub fn initcap<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Text, E::Nullable, E::Aggregate, E::Sources>
Expand description

Capitalizes the first letter of each word (INITCAP), on PostgreSQL.

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

§Examples

assert_eq!(initcap(users.name).sql(), r#"INITCAP ("users"."name")"#);