// the find
sqlc-dev/sqlc
Generate type-safe code from SQL
sqlc compiles your SQL queries and schema into type-safe Go (or Kotlin/Python/TypeScript) code. You write real SQL, run sqlc, and get generated structs and query functions — no query builder DSL to learn. It's for teams that want SQL control without the runtime reflection overhead of a traditional ORM.
The core idea is sound: SQL is parsed and type-checked at compile time, so type mismatches between your query and your code are caught before you ship, not at 2am. The pgx/v5 support with batch operations is genuinely useful for high-throughput Postgres work. The plugin system (WASM-based) means community language targets don't require forking the main repo. The end-to-end test suite in testdata/ is enormous — hundreds of SQL patterns — which means edge cases in codegen are actually exercised.
Dynamic queries are a hard wall: any WHERE clause that varies at runtime (optional filters, variable sort columns) means you're writing multiple static queries or falling back to raw SQL. The MySQL support is noticeably weaker than Postgres — type inference is shakier and some DDL constructs are unsupported. The managed database / sqlc Cloud push feature (sqlc push, sqlc verify) is an odd hosted dependency sitting in what should be a pure local tool. Non-Go targets (Kotlin, Python, TypeScript) are maintained as separate plugins with varying levels of completeness and lag behind the Go generator.