SortParams

Defines a list of field names used to sort query results.

Implements: []<SortField>

Description

The SortParams class allows you to define a list of field names used to sort query results. In addition, it allows you to specify the type of order as ascending or descending.

Constructors

NewSortParams

Creates a new instance and initializes it with specified sort fields.

NewSortParams(fields []SortField) *SortField

  • fields: []SortField - list of fields to sort by.

Examples

filter := NewFilterParamsFromTuples("type", "Type1");
paging := NewPagingParams(0, 100);
sorting := NewSortingParams(NewSortField("create_time", true));
 
myDataClient.getDataByFilter(filter, paging, sorting, (err, page) => {...});

See also