Skip to content

Write SQL. Keep TypeScript.

SQLBraid adds safe binds, readable dynamic SQL, explicit result contracts, and a small runtime for PostgreSQL, MySQL, MariaDB, SQLite, Oracle, and SQL Server, with Browser WASM and D1 paths.

SQLBraid is a SQL-first TypeScript data-access toolkit. Keep the SQL you know, without a query-builder translation layer, while retaining the boundaries that matter in production.

  • SQL stays visible. Tagged templates preserve ordinary SQL and database-specific features.
  • Values stay bound. Ordinary value interpolation becomes a logical value parameter; the selected driver owns placeholder/materialization transport, while structural SQL requires an explicit helper.
  • Results stay explicit. Declare rows, command, or call, then let runtime checks catch mismatches.
  • Runtime semantics stay honest. Direct connections and pools use different factories; transactions pin one physical connection.
  • Tooling stays optional. Metadata, deterministic code generation, LSP, CLI inspection, and VS Code support do not enter the runtime dependency path.

SQLBraid does not infer arbitrary SELECT result types, hydrate object graphs, or hide SQL behind a model DSL. Your SQL and declared row type remain the contract. Standard Schema mapping is available when a row needs validation or transformation.

For the database-to-application value boundary, see data representations and numeric fidelity. Driver profiles document the raw integer, decimal, JSON, temporal, and binary values that the runtime can actually receive.

This is the 1.0.0-rc.2 pre-release documentation. The current tree includes session/lease ownership, fixed transaction options, prepared input factories, capability-driven cancellation, and explicit unsupported errors. Targets are documented by the runtime and driver support matrix, which records support labels for exact database/driver/profile/runtime/capability tuples and their revision and workflow evidence. A neighboring version or package installation is not certification. Final exact-SHA Runtime, Docs, and Release gates and explicit release authorization remain separate requirements. See release notes and limitations before choosing an integration.