Skip to content
whichdevtool?
Categories ▾

Frameworks and UI

Frontend and full-stack frameworks Backend frameworks UI component libraries

Hosting

VPS and cloud servers App hosting and PaaS

Data

Managed databases File and object storage ORMs and database toolkits

AI

AI model APIs

Email

Transactional email APIs Email marketing and newsletters

Payments

Payments and billing

Domains and edge

Domain registrars CDN, DNS and edge security

Operations and identity

Monitoring, uptime and error tracking Auth and identity Background jobs, queues and workflows
Stacks Directory
Ctrl K

Search directory
Menu
StacksDirectory Pricing changes Glossary
VPS and cloud servers App hosting and PaaS Managed databases Transactional email APIs Email marketing and newsletters Domain registrars CDN, DNS and edge security Monitoring, uptime and error tracking Auth and identity Frontend and full-stack frameworks Backend frameworks UI component libraries AI model APIs File and object storage Payments and billing Background jobs, queues and workflows ORMs and database toolkits
  1. Home
  2. ORMs and database toolkits
  3. sqlc
Sq

SQL-to-code compiler · by sqlc (Kyle Conroy and contributors)

sqlc

Compiler that turns hand-written SQL queries and your schema into type-safe Go code, with plugins for Kotlin, Python, TypeScript and community languages; catches SQL errors at build time.

Visit sqlc.dev ↗ Alternatives Open source Open source Self-hostable
sqlc.dev
sqlc homepage
§1

Overview

sqlc has been developed since 2019, mainly by Kyle Conroy. The workflow is three steps: write queries in .sql files with a name annotation (for example -- name: GetAuthor :one), run sqlc generate, and call the generated Go methods. sqlc parses your CREATE TABLE and ALTER TABLE statements, so the generated structs and parameters match your schema, and invalid queries fail at generate time.

Go support for PostgreSQL and MySQL is stable and SQLite is beta. Official plugins generate Kotlin, Python and TypeScript (beta), and community plugins add C#, Java, Ruby, Rust (sqlx), F#, Zig and others. sqlc can also check queries against a live database with its analyzer.

sqlc does not run migrations. Point it at a migration directory from Atlas, dbmate, golang-migrate, goose, sql-migrate or tern and it will read the up migrations to learn the schema. Releases continue in 2026, with v1.31.0 and v1.31.1 in April.

§2

Pricing and plans

Plan Price What you get
sqlc $0 MIT licence; funded by GitHub sponsors

Free and open source under the MIT licence; development is funded through GitHub sponsorship.

Source: github.com/sqlc-dev/sqlc · prices as published, excluding tax.

§3

What it does

Compile-time checked SQL
Queries are parsed against your schema; mistakes fail during sqlc generate, not in production.
Idiomatic generated Go
Plain structs and methods over database/sql or pgx, with no runtime dependency on sqlc.
Language plugins
Official Kotlin, Python and TypeScript generators plus community plugins for C#, Java, Ruby, Rust and more.
Migration-aware
Reads schemas from Atlas, dbmate, golang-migrate, goose, sql-migrate and tern migration folders, ignoring down files.
Query annotations
:one, :many, :exec, :copyfrom and batch annotations control the generated method shapes.
§4

Strengths and limitations

Strengths

  • You write and review real SQL; no ORM query language to learn
  • Zero runtime overhead beyond the database driver
  • Errors caught at build time
  • Works well with any migration tool

Limitations

  • Dynamic queries (optional filters, variable ORDER BY) are awkward because each query is fixed SQL
  • SQLite support for Go is still beta; Kotlin, Python and TypeScript plugins are beta
  • No relation loading or object graph; you write the joins yourself
  • No migration runner; you need a separate tool
§5

Who it suits

Good for

  • Go services on PostgreSQL or MySQL
  • Teams that want SQL reviewed like any other code
  • Performance-sensitive backends

Look elsewhere if

  • Apps with many dynamic, user-built filters
  • Developers who prefer not to write SQL
§6

Alternatives to sqlc

Tool From Free option Stages
Ky
Kysely Type-safe TypeScript SQL query builder
— Open source
EO
Eloquent ORM Active Record ORM for Laravel
— Open source
SQLAlchemy Python SQL toolkit and ORM
— Open source
AR
Active Record (Rails) Active Record ORM for Ruby on Rails
— Open source
Prisma ORM Schema-first TypeScript ORM
$10/mo Free tier
Bu
Bun (Go ORM) SQL-first Go ORM
— Open source

All ORMs and database toolkits →

§7

Questions

Is sqlc an ORM?

No. It is a compiler that generates type-safe code from SQL you write; there is no runtime ORM layer.

Does sqlc run migrations?

No. It reads schema from migration files made by tools such as goose, golang-migrate or Atlas, which you use to apply them.

Which languages does sqlc support?

Go is built in; official plugins cover Kotlin, Python and TypeScript, and community plugins add C#, Java, Ruby, Rust and others.

Sources read for this page

  • https://sqlc.dev/
  • https://github.com/sqlc-dev/sqlc
  • https://github.com/sqlc-dev/sqlc/releases
  • https://docs.sqlc.dev/en/latest/reference/language-support.html
  • https://docs.sqlc.dev/en/latest/howto/ddl.html
Spec sheet
From
Open source
Free tier
Free to self-host
Stages
HobbyIndieStartupScale-upEnterprise Suits hobby, indie, startup, scale-up
Language
Go (plugins: Kotlin, Python, TypeScript, others)
Approach
SQL-first code generation
Databases
PostgreSQL, MySQL (stable), SQLite (beta)
Migrations
No; reads goose, golang-migrate, Atlas files
Open source
Yes
Self-host
Yes
EU data
Not stated
Category
ORMs
Visit sqlc.dev ↗

To report an out-of-date price or limit, use the correction form.

whichdevtool?

Developer and cloud tools compared on price, free tier and limits, each with its source. For side projects, solo developers and small teams.

Categories

  • VPS and cloud servers
  • App hosting and PaaS
  • Managed databases
  • Transactional email APIs
  • Email marketing and newsletters
  • Domain registrars
  • CDN, DNS and edge security
  • Monitoring, uptime and error tracking
  • Auth and identity
  • Frontend and full-stack frameworks
  • Backend frameworks
  • UI component libraries
  • AI model APIs
  • File and object storage
  • Payments and billing
  • Background jobs, queues and workflows
  • ORMs and database toolkits

Research

  • Directory
  • Stacks by project
  • Developer news
  • Pricing changes
  • Glossary

Site

  • About and methods
  • How we make money
  • Suggest a tool or fix
  • Privacy
© 2026 whichdevtool.com Prices change. Each tool page links to its source. We may earn a commission when you sign up through links on this site. How we make money