pawabase.from("table") starts a query. Add filters and options, then await it. Every read is made as the signed-in person, so your list and get access rules decide what comes back.

A list

A query returns one page, 20 records by default. See Sort and page to change that or walk through everything. total is how many records match for this caller. It is null when a per-row access rule means the server cannot count rows you may see without checking each one. Don’t build “page 3 of N” from total unless you know it is a number; use “Load more” and stop when a page comes back short.

One record by id

A record that exists but that your rule hides is also “not found”. The two are the same on purpose, so a refusal never reveals what exists.

The first match, or exactly one

first() gives the first row or null. single() expects exactly one and throws if there are none or several.

Count and exists

count() respects your rules, so it counts what you may see. For a number a person shouldn’t be able to derive (total orders across customers), compute it on a server.

Only some fields

Download less by naming the fields you need:
Fields you don’t select come back absent (typed as optional in TypeScript).

Everything that matches

all() follows the pages for you. Use it for results you know are bounded.
See Sort and page for streaming page by page.

Plain-object style

If you prefer one call with options over chaining:

Cancel and time out

Every read accepts a signal and a timeout (TypeScript):
An aborted read rejects with AbortError. In React, abort in the effect’s cleanup so a component that unmounts doesn’t set state afterwards.

Reading inside a framework

What can go wrong

Filter

Narrow what you read.

Sort and page

Order and paginate.