pub(super) fn get_ids_by_prefix(
    db: &Db,
    tree: &str,
    prefix: impl AsRef<[u8]>,
    page_params: Option<&ParamsPage>
) -> Result<Vec<u32>, AppError>
Expand description

get batch ids by scanning the prefix of the key with the format of prefix#id

§Examples

// get the id of inns that someone has joined.
user_iins = get_ids_by_prefix(&db, "user_inns", u32_to_ivec(claim.uid), None).unwrap();