- Home
- Code Generators
- sqlc
sqlc
What it is
sqlc is a free command-line tool that generates type-safe, idiomatic application code from SQL queries. You write queries, run sqlc, and call the generated interfaces and methods from application code. Documented database support covers MySQL, PostgreSQL, and SQLite. The language matrix lists Go, Kotlin, Python, and TypeScript generators; Go is stable, while the other three are marked 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 configured rules for mistakes in syntactically valid SQL, 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 described as read-only and require a running database server plus a server connection URI. Prebuilt downloads and installation options cover Linux, macOS, and Windows.
For and against
For
- Free command-line tool
- Generates type-safe interfaces and methods
- Supports MySQL, PostgreSQL, and SQLite
- Query linting and schema verification
- Linux, macOS, and Windows downloads
Against
- Several listed generators are beta
- Cloud managed databases are read-only
- Managed databases require a running server
- Hosted playground data deleted after 30 days
The verdict
sqlc focuses on turning SQL into typed application code while adding query checks and schema verification. The CLI is free, but Cloud features have separate requirements and unspecified pricing.
Who it suits
sqlc suits developers who want generated, type-safe database code from SQL. It is useful for teams working with supported databases and the listed programming languages.
Plans and prices
sqlc CLI
Free command-line tool; hosted sqlc Cloud features require a cloud project
Read 2 Oct 2026 · sqlc.dev
sqlc Cloud
Pricing not stated on the pages opened; managed databases are described as a Cloud feature
Read 2 Oct 2026 · docs.sqlc.dev
On the record
- Company
- The maker says it incorporated Riza in 2023 to work on sqlc full-time.sqlc.dev · read 2 Oct 2026
- Hosted service data
- The privacy guide says playground data is stored in Google Cloud Storage and automatically deleted after 30 days.docs.sqlc.dev · read 2 Oct 2026
- Install options
- The maker offers prebuilt downloads for Linux, macOS, and Windows, and documents installation through package managers, Go, and Docker.github.com · read 2 Oct 2026
- 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.docs.sqlc.dev · read 2 Oct 2026
- Managed database limit
- The current managed-databases guide requires access to a running database server and a server connection URI in configuration.docs.sqlc.dev · read 2 Oct 2026
- 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.docs.sqlc.dev · read 2 Oct 2026
- 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.docs.sqlc.dev · read 2 Oct 2026
- 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.docs.sqlc.dev · read 2 Oct 2026
- Purpose
- sqlc generates fully type-safe, idiomatic code from SQL queries.sqlc.dev · read 2 Oct 2026
- Query linting
- The sqlc vet command checks queries against configured rules to find mistakes in syntactically valid SQL.sqlc.dev · read 2 Oct 2026
- Schema verification
- sqlc verify checks whether schema changes break existing queries and generated code.sqlc.dev · read 2 Oct 2026
- Support
- The maker invites users to contact [email protected] or join the sqlc Discord server with feedback.sqlc.dev · read 2 Oct 2026
- Supported databases
- The documented language support matrix covers MySQL, PostgreSQL, and SQLite.docs.sqlc.dev · read 2 Oct 2026
- Workflow
- Users write SQL queries, run sqlc to generate code with type-safe interfaces, then call the generated methods from application code.sqlc.dev · read 2 Oct 2026