@karmaniverous/mock-db
    Preparing search index...

    Interface QueryOptions<E, T>

    Options for query method.

    interface QueryOptions<
        E extends Entity,
        T extends TranscodeRegistry = DefaultTranscodeRegistry,
    > {
        filter?: (item: E) => unknown;
        hashKey?: TranscodableProperties<E, T>;
        hashValue?: T[keyof T];
        indexComponents?: TranscodableProperties<E, T>[];
        limit?: number;
        pageKey?: E | Partial<Pick<E, TranscodableProperties<E, T>>>;
        sortOrder?: SortOrder<E>;
    }

    Type Parameters

    Index

    Properties

    filter?: (item: E) => unknown

    If provided, only records that pass the filter will be returned.

    Type Declaration

      • (item: E): unknown
      • Parameters

        • item: E

          Record to test.

        Returns unknown

        truthy if record should be included in result set.

    hashKey?: TranscodableProperties<E, T>

    If provided, query will only return records with matching hashValue. If not, query behaves like a DynamoDB scan.

    hashValue?: T[keyof T]

    If provided with hashKey, only matching records will be returned.

    indexComponents?: TranscodableProperties<E, T>[]

    If provided, returned pageKey will only contain these components. Otherwise it will contain the entire record.

    limit?: number

    If provided, query will only return up to limit records along with pageKey representing last record returned.

    pageKey?: E | Partial<Pick<E, TranscodableProperties<E, T>>>

    If provided, result set will begin with the record after the one represented by pageKey.

    sortOrder?: SortOrder<E>

    A SortOrder object specifying the sort order of the result set.