Facilitates async iteration.
for await (const item of collection) {
handle(item)
}
Turns the collection into an array, up to the amount specified in max
param.
const all = await collection.toArray();
const first100 = await collection.toArray({max: 100});
Optional
__namedParameters: { Optional
max?: number
A collection of related model instances.
This collection can be async-iterated or turned directly into an array using
toArray()
.