Helpful
    Preparing search index...

    Interface IZDataSource<T>

    A representation of how to retrieve data from a given system or location.

    interface IZDataSource<T> {
        count(request: IZDataRequest): Promise<number>;
        retrieve(request: IZDataRequest): Promise<T[]>;
    }

    Type Parameters

    • T

      The type of data that the system will return.

    Implemented by

    Index

    Methods

    Methods

    • Retrieves the total count of data items before pagination.

      Parameters

      • request: IZDataRequest

        The data request being made. The page and size fields are ignored in this instance.

      Returns Promise<number>

      The total number of items across pages that the request data set will represent.

    • Retrieves a single page of data.

      Parameters

      • request: IZDataRequest

        The data request that contains the sorting, filtering, search, and pagination info to construct a data view.

      Returns Promise<T[]>

      A single page of data elements.