Interface

Filter

Filter

Represents a filter used to query data with optional pagination and sorting.

Example

const filter = {
    amount: 50,
    offset: 10,
    sort: [["Name", "asc"], ["Age", "desc"]]
};

Members

number

# amount Optional

The maximum number of objects to retrieve.

Example
50
number

# offset Optional

The number of objects to skip before starting to retrieve results. Useful for pagination.

Example
10
Array.<SortSpec>

# sort Optional

Represents a sorting specification for an attribute or attribute path. The first element is the attribute or attribute path to sort by. The second element is the sort direction, which can be "asc" for ascending or "desc" for descending.

Example
// Sort by "Name" in ascending order
[["Name", "asc"]];