{"repo":"ilbertt/bun-sqlgen","free":true,"listed":false,"github":"https://github.com/ilbertt/bun-sqlgen","clone":"git clone https://github.com/ilbertt/bun-sqlgen.git","description":"Types generator for your Bun.sql queries","language":"TypeScript","stars":100,"topics":["bun","codegen","javascript","postgresql","sql","sqlite"],"license":"Unlicense","category":"databases-storage","readme_excerpt":"bun-sqlgen Types generator for your Bun.sql queries You don't need an ORM to have type-safe SQL statements in your Bun application. @ilbertt/bun-sqlgen is a codegen tool that validates your queries against your schema and generates their result types. No running database is needed at codegen time, because your migrations run against an in-memory Wasm Postgres (PGlite). Install Quick start 1. Your migrations are the source of truth for the schema — put them in any folder: 2. Wrap your client with withTypes and tag each query with its name: 3. Generate the types: This writes src/queries.gen.d.ts — commit it. With it in place, user.whatever is a compile error and user.display name.length is flagged as possibly-null, all by plain tsc . Examples Runnable projects live in the examples/ folder. Contributing Development setup and conventions are in CONTRIBUTING.md.","default_branch":null,"files":null,"tree":[],"storefront":"/r/ilbertt","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ilbertt/bun-sqlgen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}