Skip to main content
Use the structured query API for most reads and writes. It provides explicit fields, filters, grouping, sorting, pagination, and JSON-path behavior without assembling SQL strings.

Read rows

Prefer a narrow field projection and bounded take. Follow the returned cursor or next-page contract instead of loading an unbounded table.

Mutate rows

Use the dedicated insert, upsert, update, and delete methods. Bulk update and delete accept the canonical structured filter tree.

Transactions

Use api.transactionDatabase() for check-then-write workflows that must commit together.
Await transaction calls sequentially. Keep sleeps and remote HTTP/SFTP side effects outside the callback because a transaction reserves a connection and may hold row locks.

Raw SQL

api.queryDatabase() is for parameterized SELECT or WITH reads when the structured builder cannot express the query. Use the mutation helpers for writes.
Last modified on September 5, 2026