On this page
Overview
sqlc parses SQL queries and database schemas to generate typed data-access code. Applications keep writing SQL directly while generated methods, parameters, and result types provide compile-time interfaces around those queries.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Generate typed methods, parameters, and results from SQL queries
Schema and query files are analyzed to produce query-specific methods, input parameters, and result structs, reducing hand-written scanning code while retaining explicit SQL.
Sources: [2]
Extend beyond Go through Kotlin, Python, and TypeScript generators
The README lists generators for Go, Kotlin, Python, and TypeScript, with additional languages available through plugins.
Sources: [2]
Best fit
Fits backends that want explicit SQL without giving up type safety or productivity
It is useful for Go and data-heavy services that treat complex SQL as a first-class design asset while delegating parameter and result mapping to generated code.
Sources: [2]
Before adoption
v1.31.1 declares Go 1.26 and toolchain 1.26.2; pin the generator and review generated diffs
The v1.31.1 go.mod declares Go 1.26.0 with toolchain go1.26.2. The release removes a replace directive that broke go install ...@latest and adjusts a SQLite dependency. Pin sqlc in CI and review generated diffs plus database-specific behavior when schemas or queries change.
Official sources
- [1]sqlc-dev/sqlc — GitHub repository(2026-10-06)
- [2]sqlc v1.31.1 — README(2026-10-06)
- [3]sqlc v1.31.1 — go.mod(2026-10-06)
- [4]sqlc v1.31.1 release(2026-10-06)
- [5]sqlc MIT license(2026-10-06)
Supplemental curator note
sqlc keeps SQL as the source of truth while generating typed interfaces around queries, which suits backends that want to avoid ORM abstractions. Pin the generator version and validate schema, queries, and generated code together in CI.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/sqlc-dev/sqlc.git - 2
Enter the repository
cd sqlc - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
18,348 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 7
- Open PRs
- 111
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- go
- postgresql
- sql
- orm
- code-generator
- mysql
- python
- kotlin
- sqlite
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- node-postgres13,219 Stars
3 shared tag(s) · 2 shared category(s)
connect Node.js directly to PostgreSQL with pools, parameterized queries, and LISTEN/NOTIFY
JavaScript - SeaORM9,914 Stars
3 shared tag(s) · 2 shared category(s)
manage asynchronous queries, relations, and migrations with a relational ORM for Rust
Rust - Postgres.js8,728 Stars
3 shared tag(s) · 2 shared category(s)
build parameterized SQL safely through tagged templates with a lightweight PostgreSQL client
JavaScript - asyncpg8,098 Stars
3 shared tag(s) · 2 shared category(s)
access PostgreSQL directly from asyncio through a high-performance Python driver
Python - Psycopg2,504 Stars
3 shared tag(s) · 2 shared category(s)
connect Python services to PostgreSQL with synchronous and asynchronous APIs
Python - mysql22,273 Stars
3 shared tag(s) · 2 shared category(s)
connect Ruby to MySQL or MariaDB and handle SQL queries, prepared statements, and streaming results
Ruby
Report incorrect information
Tell us if any listing information is incorrect or outdated.