pub fn increment<T>() -> Assignment<T>where
T: Numeric,Expand description
Increment a numeric field by one.
The Numeric bound encodes the 1 literal in a value variant
matching the field type, so stmt::increment() works on every
supported numeric column (i8โi64, u8โu64, f32, f64) and
on user newtypes that implement Numeric.
Atomic against the existing column value on every backend, same as
add.
ยงExamples
โ
user.update()
.login_count(stmt::increment())
.exec(&mut db)
.await?;