pub(super) fn incr_id<K>(tree: &Tree, key: K) -> Result<u32, AppError>
where K: AsRef<[u8]>,
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")?;