Options<T>: {
    class: T;
    limit?: number;
    offset?: number;
    return?: "entity" | "guid" | "count";
    reverse?: boolean;
    skipCache?: boolean;
    sort?: "cdate" | "mdate" | string;
}

Type Parameters

Type declaration

  • class: T

    The Entity class to query.

  • Optional limit?: number

    The limit of entities to be returned. Not needed when using getEntity, as it always returns only one.

  • Optional offset?: number

    The offset from the first matching entity, in order, to start retrieving.

  • Optional return?: "entity" | "guid" | "count"

    What to return, the entities with their data, just the GUIDs, or just a count.

  • Optional reverse?: boolean

    If true, entities will be retrieved from newest to oldest/largest to smallest (with regard to sort).

  • Optional skipCache?: boolean

    If true, Nymph will skip the cache and retrieve the entity from the DB.

  • Optional sort?: "cdate" | "mdate" | string

    How to sort the entities. Should be "cdate", "mdate", or the name of a property.