sqlc-dev/sqlc

Generate type-safe code from SQL

Go

18,371

1,913 commits

updated Oct 10, 2026

See the code

README

sqlc: A SQL Compiler

go Go Report Card

sqlc generates type-safe code from SQL. Here's how it works:

  1. You write queries in SQL.
  2. You run sqlc to generate code with type-safe interfaces to those queries.
  3. You write application code that calls the generated code.

Check out an interactive example to see it in action, and the introductory blog post for the motivation behind sqlc.

Overview

Supported languages

Additional languages can be added via plugins.

Sponsors

Development is possible thanks to our sponsors. If you would like to support sqlc, please consider sponsoring on GitHub.

Coder.com Mint.fun Mux.com

Cyberax - NaNuNaNu - Stumble - WestfalNamur - alecthomas - cameronnewman - danielbprice - davherrmann - dvob - gilcrest - gzuidhof - jeffreylo - mmcloughlin - ryohei1216 - sgielen

code-generator
go
kotlin
mysql
orm
postgresql
python
sql
sqlite

Project health

Overall

4.5/10

Maintained

10/10

Code review

0/10
OpenSSF Scorecard

Latest release

v1.31.1 · Apr 22, 2026

Releases this year

2

Significant stargazers

(top 24 of 304)

Peter Steinberger

53,255 followers · starred May 2026

Joshua Peek

2,592 followers · starred Nov 2024

Simon Ser

2,179 followers · starred Mar 2022

Timothy Gu

1,080 followers · starred Aug 2021

sqlc-dev/sqlc

Generate type-safe code from SQL

Go

18,371

1,913 commits

updated Oct 10, 2026

See the code

README

sqlc: A SQL Compiler

go Go Report Card

sqlc generates type-safe code from SQL. Here's how it works:

  1. You write queries in SQL.
  2. You run sqlc to generate code with type-safe interfaces to those queries.
  3. You write application code that calls the generated code.

Check out an interactive example to see it in action, and the introductory blog post for the motivation behind sqlc.

Overview

Supported languages

Additional languages can be added via plugins.

Sponsors

Development is possible thanks to our sponsors. If you would like to support sqlc, please consider sponsoring on GitHub.

Coder.com Mint.fun Mux.com

Cyberax - NaNuNaNu - Stumble - WestfalNamur - alecthomas - cameronnewman - danielbprice - davherrmann - dvob - gilcrest - gzuidhof - jeffreylo - mmcloughlin - ryohei1216 - sgielen

code-generator
go
kotlin
mysql
orm
postgresql
python
sql
sqlite

Project health

Overall

4.5/10

Maintained

10/10

Code review

0/10
OpenSSF Scorecard

Latest release

v1.31.1 · Apr 22, 2026

Releases this year

2

Significant stargazers

(top 24 of 304)

Peter Steinberger

53,255 followers · starred May 2026

Joshua Peek

2,592 followers · starred Nov 2024

Simon Ser

2,179 followers · starred Mar 2022

Timothy Gu

1,080 followers · starred Aug 2021