Home

Awesome

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.

<p align="center"> <a href="https://riza.io?utm_source=sqlc+readme"><img width=400 src="https://sqlc.dev/sponsors/riza-readme.png" alt="Riza.io"></a> </p> <p align="center"> <a href="https://coder.com?utm_source=sqlc+readme"><img width=200 src="https://sqlc.dev/sponsors/coder-readme.png" alt="Coder.com" /></a> <a href="https://mint.fun?utm_source=sqlc+readme"><img width=200 src="https://sqlc.dev/sponsors/mint-readme.png" alt="Mint.fun" /></a> <a href="https://mux.com?utm_source=sqlc+readme"><img width=200 src="https://sqlc.dev/sponsors/mux-readme.png" alt="Mux.com" /></a> </p> <p align="center"> <a href="https://github.com/Cyberax">Cyberax</a> - <a href="https://github.com/NaNuNaNu">NaNuNaNu</a> - <a href="https://github.com/Stumble">Stumble</a> - <a href="https://github.com/WestfalNamur">WestfalNamur</a> - <a href="https://github.com/alecthomas">alecthomas</a> - <a href="https://github.com/cameronnewman">cameronnewman</a> - <a href="https://github.com/danielbprice">danielbprice</a> - <a href="https://github.com/davherrmann">davherrmann</a> - <a href="https://github.com/dvob">dvob</a> - <a href="https://github.com/gilcrest">gilcrest</a> - <a href="https://github.com/gzuidhof">gzuidhof</a> - <a href="https://github.com/jeffreylo">jeffreylo</a> - <a href="https://github.com/mmcloughlin">mmcloughlin</a> - <a href="https://github.com/ryohei1216">ryohei1216</a> - <a href="https://github.com/sgielen">sgielen</a> </p>