The types in this reference are exported from
@telnyx/edge-runtime (TypeScript) and describe version ≥ 0.9.0 — the first release that exports SqlDatabase and wires the env binding. They describe the env binding, the in-function surface. Running SQL from outside a function — schema changes, ad-hoc queries, migrations — goes over a separate REST path, covered in the CLI reference.[storage.sqldb.<NAME>] in telnyx.toml resolves on env.<NAME> as a SqlDatabase.
Getting the Binding
telnyx.toml; run telnyx-edge types after editing the manifest to regenerate telnyx-env.d.ts, which types env.<NAME> as a SqlDatabase. That command checks the @telnyx/edge-runtime version declared in package.json and fails with @telnyx/edge-runtime <version> does not export SqlDatabase (requires >= 0.9.0) when the floor is not met.
Related Resources
SqlDatabase— the method-by-method reference- Quick Start — create a database, bind it, query it
- How SQL Databases Work — one primary per database, and what that means for consistency
- Bindings — how bindings resolve on
env - CLI —
telnyx-edge storage sqldbfor provisioning, ad-hoc SQL, and migrations - Limits — database and value size, bound parameters, and query performance
- Stateful Actor SQL — a different product: the private embedded SQLite at
ctx.storage.sql, visible to one actor instance only and called synchronously