pub(super) fn get_batch<T, K>(
    db: &Db,
    count_tree: &str,
    key: K,
    tree: &str,
    page_params: &ParamsPage
) -> Result<Vec<T>, AppError>
where T: Decode, K: AsRef<[u8]>,
Expand description

get objects in batch that has been encoded by bincode

§Examples

// get the inns which iid is between 101-110.
let page_params = ParamsPage { anchor: 100, n: 10, is_desc: false };
let inns: Vec<Inn> = get_batch(&db, "default", "inns_count", "inns", &page_params)?;