getMany method
- List<
int> ids
Returns a list of ids.length
Objects of type T, each corresponding to the location of its ID in ids
.
Non-existent IDs become null.
Implementation
List<T> getMany(List<int> ids) {
if (ids.isEmpty) return [];
const allowMissing = true; // result includes null if an object is missing
return OBX_id_array.executeWith(
ids,
(ptr) => _getMany(
allowMissing,
() => checkObxPtr(bindings.obx_box_get_many(_cBox, ptr),
'failed to get many objects from box'),
(DataVisitor visitor) => checkObx(bindings.obx_box_visit_many(
_cBox, ptr, visitor.fn, visitor.userData))));
}