Interface QueryReturn<E, T>

Return type for query method.

interface QueryReturn<E, T> {
    count: number;
    items: E[];
    pageKey?: E | Pick<E, keyof {
        [Property in string | number | symbol as [T[keyof Exactify<T>]] extends [never]
            ? [NonNullable<(E extends EntityMap
                    ? FlattenEntityMap<(...)>
                    : E)[Property]>] extends [never]
                ? Property
                : never
            : [NonNullable<(E extends EntityMap
                    ? FlattenEntityMap<(...)>
                    : E)[Property]>] extends [never]
                ? never
                : NonNullable<(E extends EntityMap
                        ? FlattenEntityMap<(...)>
                        : E)[Property]> extends T[keyof Exactify<T>]
                    ? Property
                    : never]: never
    }>;
}

Type Parameters

Properties

Properties

count: number

Number of records returned in this result set, exclusive of other pages.

items: E[]

Records returned in this result set.

pageKey?: E | Pick<E, keyof {
    [Property in string | number | symbol as [T[keyof Exactify<T>]] extends [never]
        ? [NonNullable<(E extends EntityMap
                ? FlattenEntityMap<(...)>
                : E)[Property]>] extends [never]
            ? Property
            : never
        : [NonNullable<(E extends EntityMap
                ? FlattenEntityMap<(...)>
                : E)[Property]>] extends [never]
            ? never
            : NonNullable<(E extends EntityMap
                    ? FlattenEntityMap<(...)>
                    : E)[Property]> extends T[keyof Exactify<T>]
                ? Property
                : never]: never
}>

If limit was reached, pageKey will be provided for next page.