Playground
Want to try hyper-sql without installing anything? Open the playground right in your browser.
Each preset is a complete example project. Click the example title in the toolbar to browse the picker: examples for the selected dialect (SQLite or Postgres) appear first, grouped by topic from "Start here" through "Column types", followed by error reproductions. You can filter the list by typing, navigate with the arrow keys and Enter, or step through examples using the previous/next buttons beside the title. Switching dialects automatically opens the matching example in the other dialect when one exists.
The bar beneath the toolbar summarizes what the current example demonstrates. Project files appear in the sidebar with schema.sql, your .sql queries, and main.ts at the top, followed by tsconfig.json, sql.lock, and expected.txt.
How the playground works
- Live type-checking: Every edit triggers hyper-sql's mapper on your
.sqlfiles andsql.lock, producing read-only.sql.gen.tsmodules under Generated and type-checkingmain.tsagainst them. SQL issues are underlined directly in your.sqlfiles, TypeScript mismatches are underlined inmain.ts, and both appear in the Problems tab (with a live error count in the toolbar). - Pull: Clicking Pull loads
schema.sqlinto an in-browser database, inspects every query, and updatessql.lock—just like runninghyper-sql pulllocally. The playground also pulls automatically 400 ms after you edit any.sqlfile. - Run: Clicking Run executes
program()frommain.tsagainst the in-browser database and switches to the Output tab. An unmodified preset always matches itsexpected.txt.
SQLite (WASM) and Postgres (PGlite—a full Postgres compiled for the browser) are lazy-loaded the first time you need them. Everything runs locally in your tab; nothing is sent to a server.
Sharing links to a preset
Selecting any example updates the URL hash to #preset=<group>/<name>, so you can copy the URL to share it directly—for example sqlite/search-page. If a hash points to an unknown preset, the playground displays a notice. You can also jump to any preset from the Examples and Errors pages.
Differences from running locally
Because TypeScript 7 doesn't have a browser build yet, the playground type-checks using TypeScript 6 in memory. Locally, TypeScript 7.1 runs the exact same hyper-sql mapper natively as a content mapper.