https://github.com/sqlc-dev/sqlc
Generate type-safe code from SQL
https://github.com/sqlc-dev/sqlc
code-generator go kotlin mysql orm postgresql python sql sqlite
Last synced: 5 days ago
JSON representation
Generate type-safe code from SQL
- Host: GitHub
- URL: https://github.com/sqlc-dev/sqlc
- Owner: sqlc-dev
- License: mit
- Created: 2019-06-21T21:11:35.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-23T10:15:02.000Z (17 days ago)
- Last Synced: 2025-04-24T16:55:57.129Z (16 days ago)
- Topics: code-generator, go, kotlin, mysql, orm, postgresql, python, sql, sqlite
- Language: Go
- Homepage: https://sqlc.dev
- Size: 19.6 MB
- Stars: 14,852
- Watchers: 83
- Forks: 864
- Open Issues: 571
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - sqlc - Generate type-safe code from SQL. (Database / SQL Query Builders)
- awesome-repositories - sqlc-dev/sqlc - Generate type-safe code from SQL (Go)
- my-awesome - sqlc-dev/sqlc - generator,go,kotlin,mysql,orm,postgresql,python,sql,sqlite pushed_at:2025-04 star:14.7k fork:0.9k Generate type-safe code from SQL (Go)
- awesome - sqlc-dev/sqlc - Generate type-safe code from SQL (Go)
- awesome - sqlc-dev/sqlc - Generate type-safe code from SQL (Go)
README
# sqlc: A SQL Compiler

[](https://goreportcard.com/report/github.com/sqlc-dev/sqlc)sqlc generates **type-safe code** from SQL. Here's how it works:
1. You write queries in SQL.
1. You run sqlc to generate code with type-safe interfaces to those queries.
1. You write application code that calls the generated code.Check out [an interactive example](https://play.sqlc.dev/) to see it in action, and the [introductory blog post](https://conroy.org/introducing-sqlc) for the motivation behind sqlc.
## Overview
- [Documentation](https://docs.sqlc.dev)
- [Installation](https://docs.sqlc.dev/en/latest/overview/install.html)
- [Playground](https://play.sqlc.dev)
- [Website](https://sqlc.dev)
- [Downloads](https://downloads.sqlc.dev/)
- [Community](https://discord.gg/EcXzGe5SEs)## Supported languages
- [sqlc-gen-go](https://github.com/sqlc-dev/sqlc-gen-go)
- [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin)
- [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python)
- [sqlc-gen-typescript](https://github.com/sqlc-dev/sqlc-gen-typescript)Additional languages can be added via [plugins](https://docs.sqlc.dev/en/latest/reference/language-support.html#community-language-support).
## Sponsors
Development is possible thanks to our sponsors. If you would like to support sqlc,
please consider [sponsoring on GitHub](https://github.com/sponsors/kyleconroy).
Cyberax -
NaNuNaNu -
Stumble -
WestfalNamur -
alecthomas -
cameronnewman -
danielbprice -
davherrmann -
dvob -
gilcrest -
gzuidhof -
jeffreylo -
mmcloughlin -
ryohei1216 -
sgielen