sqlc
sqlc.dev
- Free plan
- Windows
- macOS
- Linux
- Self-hosted
What sqlc is
sqlc is a free command-line tool that turns SQL queries into type-safe application code. Users write queries, run sqlc to generate interfaces and methods, then call those methods from application code. Documented database support covers MySQL, PostgreSQL, and SQLite. Generators are listed for Go, Kotlin, Python, and TypeScript; Go is stable, while Kotlin, Python, and TypeScript are beta for MySQL and PostgreSQL. Plugins can add 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. sqlc Cloud can create short-lived hosted databases for query analysis and linting; managed databases are read-only and require a running database server plus a connection URI. Prebuilt downloads and installation routes cover Linux, macOS, and Windows. The CLI does not collect information or anonymous usage analytics.
Who it suits
sqlc suits developers who want generated, type-safe database access from SQL. It is useful for teams working with supported databases and the listed language generators.
Good to know, and what to watch
- Generates type-safe code from SQL
- Supports MySQL, PostgreSQL, and SQLite
- Includes query linting with sqlc vet
- Checks schema changes with sqlc verify
- Offers Linux, macOS, and Windows downloads
- Some generators are marked beta
- Cloud managed databases are read-only
- Cloud setup requires a running database server
Plans
Every plan and pricesqlc Cloud
sqlc CLI
Free plan
The verdict
sqlc links hand-written SQL with generated application code while adding query and schema checks. The free CLI is broadly installable, but cloud database features have additional requirements and unstated pricing.
What the maker publishes
- Company
- The maker says it incorporated Riza in 2023 to work on sqlc full-time. source
- Hosted service data
- The privacy guide says playground data is stored in Google Cloud Storage and automatically deleted after 30 days. source
- Install options
- The maker offers prebuilt downloads for Linux, macOS, and Windows, and documents installation through package managers, Go, and Docker. source
- 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. source
- Managed database limit
- The current managed-databases guide requires access to a running database server and a server connection URI in configuration. source
- 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. source
- 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. source
- 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. source
- Purpose
- sqlc generates fully type-safe, idiomatic code from SQL queries. source
- Query linting
- The sqlc vet command checks queries against configured rules to find mistakes in syntactically valid SQL. source
- Schema verification
- sqlc verify checks whether schema changes break existing queries and generated code. source
- Support
- The maker invites users to contact [email protected] or join the sqlc Discord server with feedback. source
- Supported databases
- The documented language support matrix covers MySQL, PostgreSQL, and SQLite. source
- Workflow
- Users write SQL queries, run sqlc to generate code with type-safe interfaces, then call the generated methods from application code. source
Checked against the maker's pages on 2 Oct 2026.