How-to guides
Focused guides that each walk through one task end to end. Each assumes you’ve finished the tutorial and can already run a worker.
Not sure which function shape you need? Start with Function patterns — a runnable worker for each of the five shapes — then come back here for specific tasks.
Guides
Section titled “Guides”- Function patterns — scalar, table, table-in-out, aggregate and buffering, with a complete worker for each. (Start here.)
- Value representations — what a column’s values actually are, why decimals are unscaled bigints, and the two read paths that don’t agree. (Read this before writing anything that touches a date or a decimal.)
- Runtimes & entry points — Node, Bun, Cloudflare Workers and the browser, and which of the four subpath exports each one wants.
- Expose a catalog — present the worker as a database: schemas, function-backed tables, views.
- Serve over HTTP —
serveVgiWorker, and the signing key every multi-instance deployment needs. - Cache results on the client — advertise TTLs and validators so repeat queries skip the worker entirely.
- Call a worker from TypeScript —
VgiClient, for tests, tooling, and browser front-ends. - Report errors well — the typed errors, the constraints you get for free, and the stack trace that reaches the SQL client.
Next steps
Section titled “Next steps”- New here? Start with the tutorial.
- Want the “why” behind the API? See Concepts — shared across every SDK.
- Need exact signatures? See the API Reference.