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
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
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:Everything that matches
all() follows the pages for you. Use it for results you know are bounded.
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):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.