Queries

Queries

The calls on a table: read, write, shape, search, and raw SQL.

The table is declared. First schema covers insert, find, one, count, exists, update, and delete. These pages are the rest of the surface.

one returns the row or null. More than one match is not_unique: one() on notes matched more than one row. Pass orderBy to take the first, or narrow where. A caller-supplied filter goes through filters.

I want to …

I want to …UseDocumented on
Read several rowsfindRead rows
Read one row or nulloneRead rows
Count matching rowscountRead rows
Test whether a row matchesexistsRead rows
Page with a cursorpageRead rows
Walk rows in batches.stream()Read rows
Insert a rowinsertWrite rows
Update rowsupdateWrite rows
Delete rowsdeleteWrite rows

Families

FamilyYou use it for
Read rowsfind, one, count, exists, page, distinct, stream, and explain
Write rowsInsert, update, claim, and sync
Shape resultsAggregate, include, windows, and period
Search and treesSearch, a tree, and a fragment
Where operatorsEquality, comparison, patterns, and the rest of a where
TransactionsA transaction and a batch
Typed raw SQLA typed raw call
PresetsA named where
Request filtersWhat a caller may send