Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PaginatedResultDTO<TData>

description

This class represents a paginated result object around the TData template. Data is returned in a field named data as an array of TData.

This class shall be used to respond with paginated results from an endpoint (route).

since

v0.1.0

Type Parameters

  • TData

Hierarchy

  • PaginatedResultDTO

Index

Constructors

Properties

Methods

Constructors

Properties

data: TData[]

Contains the results returned by the query in an array of template type TData.

An array of documents will always be of maximum size as it is specified in the pagination property.

access

public

var

{TData[]}

pagination: Pageable & Countable

Contains the pagination properties such as pageSize, pageNumber and total.

access

public

var

{Pageable & Countable}

Methods

  • isLastPage(): boolean
  • Method to dynamically create and return an instance of this class with the provided data type, data content and pagination content.

    access

    public

    static

    Type Parameters

    • TData

    Parameters

    • data: TData[]

      The results returned by the query in an array of template type TData.

    • pagination: Pageable & Countable

      The pagination object, contains properties such as pageSize, pageNumber and total.

    Returns PaginatedResultDTO<TData>

Generated using TypeDoc