FREEDOM251

Freedom251 › Code Generators

sqlc

Free plan LinuxMacSelf-hostedWindows

Visit sqlc Alternatives Pricing

sqlc's own site

What sqlc is

sqlc is a command-line tool that turns SQL queries into type-safe, idiomatic application code. The workflow is to write queries, run sqlc to generate code with type-safe interfaces, and call the generated methods from application code. Its documented database support covers MySQL, PostgreSQL, and SQLite. The language matrix includes generators for Go, Kotlin, Python, and TypeScript. Go is marked stable; Kotlin, Python, and TypeScript are marked beta for MySQL and PostgreSQL. Plugins provide a route to other languages, with community plugins listed for C#, F#, Java, PHP, Ruby, Zig, Python, and Rust.

The sqlc vet command checks queries against configured rules for mistakes that can exist even when SQL is syntactically valid. The sqlc verify command checks whether schema changes break existing queries and generated code. sqlc Cloud offers short-lived hosted databases for database-backed query analysis and linting; its managed databases are read-only and require a running database server and a server connection URI in configuration. The CLI is free, with prebuilt downloads for Linux, macOS, and Windows. Installation is also documented through package managers, Go, and Docker. The maker says the CLI does not collect information, send third-party crash reports, or gather anonymous usage analytics.

Who it suits

sqlc suits developers who want to generate typed application code from SQL queries for MySQL, PostgreSQL, or SQLite. It is especially relevant to teams working in Go, or evaluating the beta Kotlin, Python, or TypeScript generators, and those who want query checks or schema verification.

What it does well

  • Generates typed interfaces and methods from SQL queries.
  • Documents support for MySQL, PostgreSQL, and SQLite.
  • Includes query linting through sqlc vet.
  • Checks schema changes against queries and generated code.
  • Free CLI has Linux, macOS, and Windows downloads.

What to know first

  • Kotlin, Python, and TypeScript generators are beta for MySQL and PostgreSQL.
  • Managed Cloud databases are read-only.
  • Managed databases require a running server and connection URI.

Limits

The free sqlc CLI does not include hosted Cloud features unless a cloud project is used. Managed databases are read-only and require access to a running database server plus a server connection URI in configuration.

Plans

PlanBilled and limitsPrice
sqlc CLIFree command-line tool; hosted sqlc Cloud features require a cloud projectFree
sqlc CloudPricing not stated on the pages opened; managed databases are described as a Cloud featureOn request

As sqlc.dev lists them, read 2 Oct 2026. The maker's own page has the final word.

Getting started

  1. Visit the sqlc website and choose a CLI installation route.
  2. Install a prebuilt download or use a package manager, Go, or Docker.
  3. Write SQL queries and run sqlc to generate code.
  4. Call the generated methods from your application.
  5. Use sqlc vet or sqlc verify for query and schema checks as needed.
  6. For Cloud managed databases, configure access to a running database server and provide its connection URI.

Verdict

Pick sqlc if you want a free CLI that generates type-safe code from SQL and supports query or schema checks. Go users have a stable generator; teams relying on the listed Kotlin, Python, or TypeScript generators should account for their beta status. Cloud managed databases are read-only and require a configured server connection.

Questions

Is sqlc free?

The sqlc CLI is free. Hosted sqlc Cloud features require a cloud project.

Which databases does it support?

The documented language support matrix covers MySQL, PostgreSQL, and SQLite.

Which languages can it generate?

The matrix lists Go, Kotlin, Python, and TypeScript generators. Go is stable, while Kotlin, Python, and TypeScript are beta for MySQL and PostgreSQL; plugins add other language options.

Which operating systems can run the CLI?

Prebuilt downloads are offered for Linux, macOS, and Windows. Installation is also documented through package managers, Go, and Docker.

What do sqlc vet and sqlc verify do?

sqlc vet checks queries against configured rules. sqlc verify checks whether schema changes break existing queries and generated code.

What are the requirements for managed Cloud databases?

They are described as read-only and require access to a running database server and a server connection URI in configuration.

Facts from sqlc's own pages

Company
The maker says it incorporated Riza in 2023 to work on sqlc full-time. · sqlc.dev, 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, 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, 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, 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, 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, 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, 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, 2 Oct 2026
Purpose
sqlc generates fully type-safe, idiomatic code from SQL queries. · sqlc.dev, 2 Oct 2026
Query linting
The sqlc vet command checks queries against configured rules to find mistakes in syntactically valid SQL. · sqlc.dev, 2 Oct 2026
Schema verification
sqlc verify checks whether schema changes break existing queries and generated code. · sqlc.dev, 2 Oct 2026
Support
The maker invites users to contact [email protected] or join the sqlc Discord server with feedback. · sqlc.dev, 2 Oct 2026
Supported databases
The documented language support matrix covers MySQL, PostgreSQL, and SQLite. · docs.sqlc.dev, 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, 2 Oct 2026

Where sqlc stands on Freedom251

Look at these too