List queries accept four main arguments:
where filters the results;
orderBy defines their order;
limit defines the maximum number of results;
offset skips the first results.
You can use several arguments in the same query.
Filter results
Add where and specify an operator for each field that you want to filter.
The common operators are:
_ilike ignores differences between uppercase and lowercase characters. Combine
conditions with _and, _or, or _not.
The site: { name: … } filter uses related data. It selects receivings from the
name of their site.
Sort and paginate
This query returns the 50 latest receivings:
To read the next page, add the limit value to offset. Keep the same orderBy
for every page. Otherwise, some rows can be repeated or missing.
Select a relation like another field. The following query returns a receiving,
its supplier, its lines, and the article for each line.
supplier is an alias. It replaces the supplierOrganization name in the
response. A nested relation can also have its own where argument.
Count results
Use an operation that ends with Aggregate to calculate a value across several
records.
Depending on the field type, you can also use sum, avg, min, or max. The
server calculates the result without returning every row.
The custom tables and fields in your space use the same filters and relations.