Skip to main content

repeat

Function repeat 

Source
pub fn repeat<'a, V, E, N>(
    expr: E,
    n: N,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Text, <E::Nullable as Nullability>::Or<N::Nullable>, <E::Aggregate as AggregateKind>::Or<N::Aggregate>, (E::Sources, N::Sources)>
Expand description

Repeats a text value n times (REPEAT), on PostgreSQL and MySQL.

expr must be text and n an integer. The result is text, nullable if either argument is.

ยงExamples

assert_eq!(repeat(users.name, 2).sql(), r#"REPEAT ("users"."name", $1)"#);