Type Alias ShardQueryFunction<C>Protected

ShardQueryFunction<C>: ((hashKey: string, pageKey?: PageKey<C>, pageSize?: number) => Promise<ShardQueryResult<C>>)

A query function that returns a single page of results from an individual shard.

This function will typically be composed dynamically to express a specific query index & logic. The arguments to this function will be provided by the EntityManager.query method, which assembles many returned pages queried across multiple shards into a single query result.

Type Parameters

Type declaration

    • (hashKey, pageKey?, pageSize?): Promise<ShardQueryResult<C>>
    • Parameters

      • hashKey: string

        The hash key value of the shard being queried.

      • OptionalpageKey: PageKey<C>

        The PageKey returned by the previous query on this shard.

      • OptionalpageSize: number

        The maximum number of items to return from this query.

      Returns Promise<ShardQueryResult<C>>