pub fn char_length<'a, V, E>(
expr: E,
) -> SQLExpr<'a, V, <E::SQLType as LengthPolicy<V::DialectMarker>>::Output, E::Nullable, E::Aggregate, E::Sources>Expand description
Number of characters in a text value.
Renders CHAR_LENGTH(expr) on PostgreSQL and MySQL and LENGTH(expr) on
SQLite, which counts characters. The argument must be text. The result is
an integer (see LengthPolicy) and keeps the argument’s nullability.
§Examples
// SQLite
assert_eq!(char_length(users.name).sql(), r#"LENGTH ("users"."name")"#);