Skip to main content

nextval

Function nextval 

Source
pub fn nextval<'a, V, E>(
    sequence: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::BigInt, NonNull, Scalar>
where V: SQLParam + 'a, V::DialectMarker: SequenceSupport, E: Expr<'a, V>, E::SQLType: Textual,
Expand description

NEXTVAL - advances a sequence and returns its new value (PostgreSQL).

The argument is the sequence name as a text expression.

ยงExample

use drizzle_core::expr::nextval;

// SELECT NEXTVAL('users_id_seq')
let next_id = nextval("users_id_seq");