OSS TanbouSign in with GitHub

keep SQL as the source of truth and generate type-safe data-access code

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
18,348
Primary language
Go
License
MIT
Repository last updated
Oct 1, 2026
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.

Sources: [3][4][2]

Official sources

  1. [1]sqlc-dev/sqlc — GitHub repository(2026-10-06)
  2. [2]sqlc v1.31.1 — README(2026-10-06)
  3. [3]sqlc v1.31.1 — go.mod(2026-10-06)
  4. [4]sqlc v1.31.1 release(2026-10-06)
  5. [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. 1

    Get the source

    git clone --depth 1 https://github.com/sqlc-dev/sqlc.git
  2. 2

    Enter the repository

    cd sqlc
  3. 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
Check the official README

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

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • go
  • postgresql
  • sql
  • orm
  • code-generator
  • mysql
  • python
  • kotlin
  • sqlite
Stars
18,348
Forks
1,096
Watchers
86
Open issues
586
Contributors
243
Owner type
Organization
Primary language
Go
License
MIT
Repository last updated
Oct 1, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?