sqlc
sqlc.dev
What it is
sqlc is a free command-line tool that turns SQL queries into type-safe application code. You write queries, run sqlc, and call the generated methods from application code through type-safe interfaces. Its documented database matrix covers MySQL, PostgreSQL, and SQLite. Official generators are available for Go, Kotlin, Python, and TypeScript; Go is stable, while Kotlin, Python, and TypeScript are marked beta for MySQL and PostgreSQL. Plugins allow additional languages, with community plugins listed for C#, F#, Java, PHP, Ruby, Zig, Python, and Rust. The sqlc vet command checks queries against configured rules, and sqlc verify checks whether schema changes break existing queries and generated code. Installation options include prebuilt Linux, macOS, and Windows downloads, package managers, Go, and Docker. sqlc Cloud can create short-lived hosted databases for analysis and linting, with managed databases described as read-only.
Spec sheet
- Purpose
- sqlc generates fully type-safe, idiomatic code from SQL queries.Read 2 Oct 2026 · sqlc.dev
- Privacy
- The privacy guide says the sqlc command-line tool does not collect information, send crash reports to third parties, or gather anonymous usage analytics.Read 2 Oct 2026 · docs.sqlc.dev
- Support
- The maker invites users to contact [email protected] or join the sqlc Discord server with feedback.Read 2 Oct 2026 · sqlc.dev
- Company
- The maker says it incorporated Riza in 2023 to work on sqlc full-time.Read 2 Oct 2026 · sqlc.dev
- Hosted service data
- The privacy guide says playground data is stored in Google Cloud Storage and automatically deleted after 30 days.Read 2 Oct 2026 · docs.sqlc.dev
- Install options
- The maker offers prebuilt downloads for Linux, macOS, and Windows, and documents installation through package managers, Go, and Docker.Read 2 Oct 2026 · github.com
- Languages
- The official language matrix lists Go, Kotlin, Python, and TypeScript generators, with Go stable and Kotlin, Python, and TypeScript marked beta for MySQL and PostgreSQL.Read 2 Oct 2026 · docs.sqlc.dev
- Managed database limit
- The current managed-databases guide requires access to a running database server and a server connection URI in configuration.Read 2 Oct 2026 · docs.sqlc.dev
- Managed databases
- sqlc Cloud can create short-lived hosted databases for database-backed query analysis and linting; the current guide describes managed databases as read-only.Read 2 Oct 2026 · docs.sqlc.dev
- Plugins
- The documentation says new languages can be added via plugins and lists community plugins for languages including C#, F#, Java, PHP, Ruby, Zig, Python, and Rust.Read 2 Oct 2026 · docs.sqlc.dev
- Query linting
- The sqlc vet command checks queries against configured rules to find mistakes in syntactically valid SQL.Read 2 Oct 2026 · sqlc.dev
- Schema verification
- sqlc verify checks whether schema changes break existing queries and generated code.Read 2 Oct 2026 · sqlc.dev
- Supported databases
- The documented language support matrix covers MySQL, PostgreSQL, and SQLite.Read 2 Oct 2026 · docs.sqlc.dev
- Workflow
- Users write SQL queries, run sqlc to generate code with type-safe interfaces, then call the generated methods from application code.Read 2 Oct 2026 · sqlc.dev
Plans and prices
Strong points and limits
Strong points
- Free command-line tool
- Supports MySQL, PostgreSQL, and SQLite
- Type-safe code generation
- Query linting and schema verification
- Linux, macOS, and Windows downloads
Limits
- Some official generators are beta
- Managed databases are read-only
- Cloud managed databases require a running server
Who it suits
sqlc suits developers who want generated, type-safe database code from SQL and teams working with supported databases. It also fits projects needing query checks, schema verification, or plugin-based language options.
Verdict
sqlc combines SQL-first development with generated interfaces, validation commands, and several installation routes. Check generator stability and the Cloud database requirements against your project.
Where Specifiction places it
- Code Generators#23 of 337.6