@karmaniverous/entity-manager
    Preparing search index...

    Interface QueryOptions<CC, ET, ITS, CF, K>Protected

    Options passed to the EntityManager.query method.

    interface QueryOptions<
        CC extends BaseConfigMap,
        ET extends EntityToken<CC> = EntityToken<CC>,
        ITS extends string = string,
        CF = unknown,
        K = unknown,
    > {
        entityToken: ET;
        item: EntityItemByToken<CC, ET>;
        limit?: number;
        pageKeyMap?: string;
        pageSize?: number;
        shardQueryMap: ShardQueryMap<CC, ET, ITS, CF, K>;
        sortOrder?: SortOrder<Projected<EntityItemByToken<CC, ET>, K>>;
        throttle?: number;
        timestampFrom?: number;
        timestampTo?: number;
    }

    Type Parameters

    Index

    Properties

    entityToken: ET

    Identifies the entity to be queried. Key of Config entities.

    Partial item object sufficiently populated to generate index hash keys.

    limit?: number

    The target maximum number of records to be returned by the query across all shards.

    The actual number of records returned will be a product of pageSize and the number of shards queried, unless limited by available records in a given shard.

    pageKeyMap?: string

    pageKeyMap returned by the previous iteration of this query.

    pageSize?: number

    The maximum number of records to be returned by each individual query to a single shard (i.e. ShardQueryFunction execution).

    Note that, within a given query method execution, these queries will be repeated until either available data is exhausted or the limit value is reached.

    shardQueryMap: ShardQueryMap<CC, ET, ITS, CF, K>

    Each key in this object is a valid entity index token. Each value is a valid 'ShardQueryFunction' that specifies the query of a single page of data on a single shard for the mapped index.

    This allows simultaneous queries on multiple sort keys to share a single page key, e.g. to match the same string against firstName and lastName properties without performing a table scan for either.

    A SortOrder object specifying the sort order of the result set. Defaults to []. Aligned with the projected item shape when K is provided.

    throttle?: number

    The maximum number of shards to query in parallel. Overrides options throttle.

    options.throttle

    timestampFrom?: number

    Lower limit to query shard space.

    Only valid if the query is constrained along the dimension used by the EntityManager.config.entities.<entityToken>.sharding.timestamptokens.timestamp function to generate shardKey.

    0

    timestampTo?: number

    Upper limit to query shard space.

    Only valid if the query is constrained along the dimension used by the EntityManager.config.entities.<entityToken>.sharding.timestamptokens.timestamp function to generate shardKey.

    Date.now()