UNPKG

903 BTypeScriptView Raw
1/** @module data */
2/**
3 * Defines a field name and order used to sort query results.
4 *
5 * @see [[SortParams]]
6 *
7 * ### Example ###
8 *
9 * let filter = FilterParams.fromTuples("type", "Type1");
10 * let paging = new PagingParams(0, 100);
11 * let sorting = new SortingParams(new SortField("create_time", true));
12 *
13 * myDataClient.getDataByFilter(filter, paging, sorting, (err, page) => {...});
14 */
15export declare class SortField {
16 /** The field name to sort by */
17 name: string;
18 /** The flag to define sorting order. True to sort ascending, false to sort descending */
19 ascending: boolean;
20 /**
21 * Creates a new instance and assigns its values.
22 *
23 * @param name the name of the field to sort by.
24 * @param ascending true to sort in ascending order, and false to sort in descending order.
25 */
26 constructor(name?: string, ascending?: boolean);
27}