EVERYTHING XIAOMI
Get listed

sqlc

sqlc is a free command-line tool that generates type-safe application code from SQL queries.

Place
#21 of 33
Score
6.2
sqlc's website

What sqlc is

sqlc is a free command-line tool that generates type-safe application code from SQL queries. The workflow is to write queries, run sqlc to generate interfaces and methods, then call those generated methods from application code. Its documented database support covers MySQL, PostgreSQL, and SQLite. The language matrix lists generators for Go, Kotlin, Python, and TypeScript; Go is stable, while Kotlin, Python, and TypeScript are 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 `vet` command checks queries against configured rules, and `verify` checks whether schema changes break existing queries and generated code. The CLI has downloads for Linux, macOS, and Windows, plus installation options through package managers, Go, and Docker. sqlc Cloud offers short-lived hosted databases for query analysis and linting; managed databases are read-only and require a running database server and a connection URI in configuration.

Good

  • Free command-line tool.
  • Generates type-safe code from SQL queries.
  • Includes query linting and schema verification commands.
  • Available for Linux, macOS, and Windows.
  • Plugins can add language support.

Watch out

  • Documented database support is limited to three engines.
  • Kotlin, Python, and TypeScript generators are beta for MySQL and PostgreSQL.
  • Managed databases require a running server and connection URI.
  • Managed databases are read-only.

Who it suits

sqlc suits developers who want generated, type-safe code from SQL queries and work with MySQL, PostgreSQL, or SQLite. It is also relevant to teams that want query checks or schema verification in their workflow.

Verdict

sqlc connects SQL queries to generated application code and includes commands for checking queries and schema changes. Review the language maturity and managed-database requirements before choosing its Cloud features.

Plans and prices

From sqlc's own pricing page, checked 2 Oct 2026.

All about pricing
PlanPriceWhat it gives you
sqlc CLIFreeFree command-line tool; hosted sqlc Cloud features require a cloud project
sqlc CloudPriced on requestPricing not stated on the pages opened; managed databases are described as a Cloud feature

The facts

Each one read from sqlc's own pages, with the date it was checked.

The company

Company
The maker says it incorporated Riza in 2023 to work on sqlc full-time.checked 2 Oct 2026

What it does

Hosted service data
The privacy guide says playground data is stored in Google Cloud Storage and automatically deleted after 30 days.checked 2 Oct 2026
Install options
The maker offers prebuilt downloads for Linux, macOS, and Windows, and documents installation through package managers, Go, and Docker.checked 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.checked 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.checked 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.checked 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.checked 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.checked 2 Oct 2026
Purpose
sqlc generates fully type-safe, idiomatic code from SQL queries.checked 2 Oct 2026
Query linting
The sqlc vet command checks queries against configured rules to find mistakes in syntactically valid SQL.checked 2 Oct 2026
Schema verification
sqlc verify checks whether schema changes break existing queries and generated code.checked 2 Oct 2026
Support
The maker invites users to contact [email protected] or join the sqlc Discord server with feedback.checked 2 Oct 2026
Supported databases
The documented language support matrix covers MySQL, PostgreSQL, and SQLite.checked 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.checked 2 Oct 2026

Alternatives to sqlc

All alternatives
  1. 1

    SQLDelight

    Free planOpen sourceAndroidiOSWebAPI
    7.9Free plan
  2. 2

    Fern

    Free planOpen sourceWebAPILinuxmacOS
    7.8Free plan
  3. 3

    Swagger Codegen

    Free planOpen sourceWebAPILinuxmacOS
    7.6Free plan
  4. 4

    APIMatic

    Free planWebAPIExtensionLinux
    7.4From $99 a month
  5. 5

    Symfony MakerBundle

    Free planOpen sourceAPILinuxmacOSSelf-hosted
    7.4Free plan
  6. 6quicktype logo

    quicktype

    Free planWebAPILinuxmacOS
    7.3From $19 a month