AppsAutessaDB

Queries, APIs and SDKs · AutessaDB

Filters, sorting and pagination

AutessaDB queries filter rows with groups of conditions: conditions inside a group combine with AND or OR, and the groups combine with AND or OR too. Operators cover comparisons, text matching, lists, ranges and nulls, with multi-column sorting, 1-based page numbers, and cursor (keyset) pagination that stays fast on large tables.

A database essential, built in
query · whereGroupscursor modeSAMPLE
[{ "logicalOperator": "AND", "conditions": [
   { "columnName": "status",  "operator": "IN",
     "value": ["open", "waiting"] },
   { "columnName": "subject", "operator": "ICONTAINS",
     "value": "invoice" } ] }]
orderBy: [{ "columnName": "created_at", "direction": "ASC" }]
rowshasMore: trueSAMPLE
idsubjectstatus
2201Invoice missing POopen
2208Duplicate invoicewaiting
2219Invoice address changeopen
nextCursor eyJpZCI6MjIxOX0 · pass it back with the same orderBy

-- the problem

Every client invents its own query language

When a web app, a script and an agent each talk to data differently, the same question returns three answers. AutessaDB has one condition format, the same in the builder, the REST API, the CLI, the SDK and agent tools, so a filter written once works everywhere.

What you get

  • Operators: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, CONTAINS, ICONTAINS, STARTS_WITH, ENDS_WITH, LIKE, ILIKE, IN, NOT_IN, BETWEEN, IS_NULL and IS_NOT_NULL.
  • ICONTAINS is case-insensitive, made for a search box people type into.
  • Sort by several columns in priority order; the default is last updated, newest first, then id.
  • Cursor pagination: pass the previous nextCursor back as cursor with the same sort, and skip the total count unless you need it.
  • Filters take plain values, while row writes use typed values, which keeps queries short.
  • Masked columns allow equality operators only, and media columns allow only IS_NULL and IS_NOT_NULL.
  • Filtering on a column the caller cannot see is refused with a clear message.

-- how it works

How does filters, sorting and pagination work in AutessaDB?

  1. Build the conditions

    Group conditions by how they should combine, for example status equals doing AND created after a date.

  2. Sort

    Add orderBy terms in priority order; only an explicit ASC ascends.

  3. Page

    Use page and pageSize for small tables, or cursors for large ones.

-- every option

Query options

optionwhat it does
whereGroupsA list of groups, each with a logicalOperator and conditions (columnName, operator, value).
groupsLogicalOperatorHow groups combine: AND or OR.
IN / NOT_IN / BETWEENTake an array; BETWEEN takes exactly [low, high].
LIKE / ILIKEPass % and _ through unescaped, so never hand them raw user input.
orderBySort terms; defaults to updated_at DESC then id DESC.
page / pageSize1-based offset paging.
cursor / includeTotalKeyset paging from nextCursor; totals are off by default on cursor requests.

-- example

Filter rows from the CLIbash
autessa autessadb query query --tableId ayXduiaLeFKh --whereGroups '[
  {
    "logicalOperator": "AND",
    "conditions": [
      { "columnName": "status",     "operator": "EQUALS",       "value": "doing" },
      { "columnName": "created_at", "operator": "GREATER_THAN", "value": "2026-09-01" }
    ]
  }
]'

Full reference in the AutessaDB CLI docs and the API reference.

-- permissions

Who can do what?

accesscan
READRun get-data, query, join-query, aggregate, get-single-row and search.

-- relations

How it connects

-- faq

Questions about filters, sorting and pagination

How do I paginate through a large AutessaDB table?

Use cursor pagination. Pass the previous response's nextCursor as cursor with the same orderBy, and leave totals off unless you need them.

Which operator should a search box use?

ICONTAINS, which is a case-insensitive contains. Avoid LIKE and ILIKE for user input, because they pass % and _ through.

Are pages 0-based or 1-based?

1-based for table queries.

$ autessa autessadb tables create

Try filters, sorting and pagination in AutessaDB

Queries take groups of AND/OR conditions with comparison, text, list and null operators, multi-column sorts, and either page numbers or cursors for large tables.

Read the AutessaDB guide or install the CLI.

100% customizable, code and all

Make AutessaDB fully your own.

Use it out of the box, then change anything. Ask Autobot, Autessa’s AI builder, for a new field, screen, report, workflow or agent and it builds it into your copy of the app. Or open the code and edit it yourself. Nothing is locked: the app, its data and its code are yours.

Start free and make it yours