Filtering and sorting
Teo supports filtering and sorting with the where
and orderBy
query options
respectively.
Filtering
Teo allows you to filter records on any combination of model fields, including
related models, and supports a variety of filter conditions.
Filter conditions and operators
The following query filters all Artist
records with id
equals to 4
or
name
equals to "Angela Peterson"
.
Hide HTTP response
Filter on relations
The following query filters all Artist
records who has at least one song with
name starts with "F"
.
Hide HTTP response
Sorting
Teo allows you to sort records on any combination of scalar model fields. In
the future, sorting by relation will be supported.
Sort by a single field
The following query sorts artists by id.
Hide HTTP response
Sort by multiple fields
The following query sorts artists by age and name.
Hide HTTP response