Function incr_id
Source pub(super) fn incr_id<K>(
db: &TransactionalKeyspace,
key: K,
) -> Result<u32, AppError>
Expand description
Update the counter and return the new id. It is contiguous if every id is used.
§Examples
ⓘlet new_user_id = incr_id(&DB, "users_count")?;;