Skip to content
/ sqlc Public
forked from sqlc-dev/sqlc

Generate type-safe code from SQL。将 SQL 转成类型安全的 Go 代码的工具。它可以将输入的 SQL 语句,自动转化成类型安全、可读的操作数据库的 Go 代码,支持 MySQL、PostgreSQL 和 SQLite 数据库。

License

Notifications You must be signed in to change notification settings

amix134/sqlc

 
 

Repository files navigation

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.

Acknowledgments

sqlc was inspired by PugSQL and HugSQL.

About

Generate type-safe code from SQL。将 SQL 转成类型安全的 Go 代码的工具。它可以将输入的 SQL 语句,自动转化成类型安全、可读的操作数据库的 Go 代码,支持 MySQL、PostgreSQL 和 SQLite 数据库。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.6%
  • ANTLR 3.1%
  • Other 0.3%