Awee

app:records:query

Queries records from a schema table using filters, sorting and pagination

Queries records from a schema table using filters, sorting and pagination

Options

NameTypeDescription
org_idstringThe organisation ID that scopes the operation
schemastringThe name of the schema (database) to query records from
tablestringThe name of the table to query records from
pageintThe page number to retrieve (1-based)
queryQueryThe filter, sort, limit and offset parameters for the query
  ↳ filtersFilterAre AND-combined predicates that records must satisfy.
    ↳ fieldstringIs the name of the field to compare. Must exist on the target table.
    ↳ opFilterOpIs the comparison operator.
    ↳ valueanyIs the operand. For OpIn and OpNotIn it must be a slice. Ignored for OpIsNull and OpIsNotNull.
  ↳ sortSortFieldIs the ordered list of sort criteria. Earlier entries take precedence.
    ↳ fieldstringIs the name of the field to sort by.
    ↳ directionSortDirectionIs the sort order (ascending or descending).
  ↳ limitintCaps the number of returned records. 0 means no limit.
  ↳ offsetintSkips the first N matching records. Intended for pagination.
  ↳ include_deletedboolIncludeDeleted, when true, includes soft-deleted records in the result. Defaults to false so deleted records are filtered out.
limitintThe maximum number of records to return per page

Outputs

NameTypeDescription
limitintThe maximum number of records per page applied to the query
pageintThe current page number returned
totalintThe total number of matching records across all pages
itemsRecordThe records on the current page

How is this guide?

On this page