A collection of related model instances.

This collection can be async-iterated or turned directly into an array using toArray().

Type Parameters

  • T

Implements

Constructors

Methods

Constructors

Methods

  • 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});

    Parameters

    • Optional __namedParameters: {
          max?: number;
      }
      • Optional max?: number

    Returns Promise<T[]>