Nymph.js 1.0.0-beta.113
    Preparing search index...

    Type Alias Options<T>

    type Options<T extends EntityConstructor = EntityConstructor> = {
        acRequest?: TilmeldAccessRequest;
        class?: T;
        limit?: number;
        offset?: number;
        return?: "entity" | "object" | "guid" | "count";
        reverse?: boolean;
        skipAc?: boolean;
        skipCache?: boolean;
        sort?: "cdate" | "mdate" | string | null;
        source?: string;
    }

    Type Parameters

    Index

    Properties

    The level(s) of access control requested.

    Limiting the access control can significantly improve the performance of the query.

    class?: T

    The Entity class to query.

    limit?: number

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

    offset?: number

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

    return?: "entity" | "object" | "guid" | "count"

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

    'object' is only available on the server, as there are substantial security implications with using it. It returns the full entity data as a simple object. You should only use it for operations where instantiating the entities has an unacceptable performance cost.

    reverse?: boolean

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

    skipAc?: boolean

    If true, Tilmeld will not filter returned entities according to access controls. (If Tilmeld is installed.) (This is always set to false by the REST endpoint and PubSub server.)

    skipCache?: boolean

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

    sort?: "cdate" | "mdate" | string | null

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

    When null, the result set will not be sorted in any particular way. It's really up to the DB how the results are returned. In this case, limit and offset may work for pagination, but shouldn't be relied on.

    source?: string

    Will be 'client' if the query came from a REST request or the PubSub server. (Mainly used in Tilmeld for access control.)