Fully typed
Query results and filters are inferred from table definitions.
Load related records in one SQL statement, run transactions without passing them around, and reuse tables across tenant schemas.
Load forms with their fields in one SQL statement:
const forms = await db.form
.where({ published: true })
.select("id", "name")
.select(form => ({
fields: form.fields.select("id", "label"),
}))
// forms: { id: string; name: string; fields: { id: string; label: string }[] }[]See Related Records for filtering, nesting, and reusing related records.