pub fn setval<'a, V, E, N>(
sequence: E,
value: N,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::BigInt, <E::Nullable as Nullability>::Or<N::Nullable>, <E::Aggregate as AggregateKind>::Or<N::Aggregate>, (E::Sources, N::Sources)>where
V: SQLParam + 'a,
V::DialectMarker: DialectSupports<Sequence>,
E: Expr<'a, V>,
E::SQLType: Textual,
N: Expr<'a, V>,
N::SQLType: Integral,
N::Nullable: Nullability,
N::Aggregate: AggregateKind,Expand description
Sets a sequence’s current value (SETVAL), on PostgreSQL.
The next NEXTVAL returns value + 1. sequence must be text and value
an integer. The result is the value set, as int8, nullable if either
argument is.
§Examples
let reset = setval::<Value, _, _>("users_id_seq", 100);
assert_eq!(reset.sql(), "SETVAL ($1, $2)");