Go (Golang) ORMs and SQL query builders
GORM, ent, sqlc, Squirrel, bun, goqu and other ways to talk to a SQL database from Go
Actualizado · GitHub stars (stars)
Por qué estos 20
Ranked by GitHub stars: how many developers bookmarked the project. Stars measure attention, not speed or fit, so each row also shows forks, licence and the last push. Go teams pick between three styles here: full ORMs that map structs to tables (GORM, ent, bun), code generators that write typed Go from your SQL or schema (sqlc, SQLBoiler, jet, xo) and query builders that only assemble SQL strings (Squirrel, goqu). Many Go teams use plain database/sql or sqlx with no ORM at all. Older projects keep their stars after activity slows: check the last push. It doesn't show benchmark results or which databases each one supports.
-
1
GORM
The fantastic ORM library for Golang, aims to be developer friendly.
40,000 stars 4,240 forkslast push 2026-10-24GoMIT
También en: #1 Go (Golang) ORMs
-
2
-
3
ent
An entity framework for Go. Simple, yet powerful ORM for modeling and querying data.
17,241 stars 1,024 forkslast push 2026-10-14GoApache-2.0
-
4
Squirrel
Go library that helps you build SQL queries.
7,987 stars 516 forkslast push 2024-04-24GoNOASSERTION
También en: #19 Go database tools and engines#1 Go (Golang) SQL query builders
-
5
SQLBoiler
ORM generator. Generate a featureful and blazing-fast ORM tailored to your database schema.
6,978 stars 560 forkslast push 2026-11-08GoNOASSERTION
-
6
bun
SQL-first Golang ORM. Successor of go-pg.
5,003 stars 323 forkslast push 2026-11-20GoBSD-2-Clause
También en: #2 Go (Golang) ORMs
-
7
xo
Generate idiomatic Go code for databases based on existing schema definitions or custom queries supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft...
3,898 stars 337 forkslast push 2026-09-08GoMIT
-
8
jet
Framework for writing type-safe SQL queries in Go, with ability to easily convert database query result into desired arbitrary object structure.
3,836 stars 198 forkslast push 2026-11-07GoApache-2.0
También en: #2 Go (Golang) SQL query builders
-
9
gorp
Go Relational Persistence, ORM-ish library for Go.
3,742 stars 379 forkslast push 2024-11-19GoMIT
También en: #3 Go (Golang) ORMs
-
10
upper.io/db
Single interface for interacting with different data sources through the use of adapters that wrap mature database drivers.
3,660 stars 238 forkslast push 2026-10-06GoMIT
También en: #4 Go (Golang) ORMs
-
11
goqu
Idiomatic SQL builder and query library.
2,676 stars 227 forkslast push 2026-11-19GoMIT
También en: #3 Go (Golang) SQL query builders
-
12
bob
SQL query builder and ORM/Factory generator for Go. Successor of SQLBoiler.
1,805 stars 120 forkslast push 2026-11-22GoMIT
También en: #6 Go (Golang) ORMs
-
13
go-sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM.
1,730 stars 146 forkslast push 2026-11-25GoMIT
También en: #7 Go (Golang) ORMs
-
14
pop/soda
Database migration, creation, ORM, etc... for MySQL, PostgreSQL, and SQLite.
1,528 stars 248 forkslast push 2026-11-21GoMIT
También en: #8 Go (Golang) ORMs
-
15
reform
Better ORM for Go, based on non-empty interfaces and code generation.
1,453 stars 74 forkslast push 2026-10-19GoMIT
También en: #9 Go (Golang) ORMs
-
16
rel
Modern Database Access Layer for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API.
788 stars 62 forkslast push 2026-11-01GoMIT
También en: #10 Go (Golang) ORMs
-
17
ozzo-dbx
Powerful data retrieval methods as well as DB-agnostic query building capabilities.
674 stars 111 forkslast push 2026-10-27GoMIT
También en: #4 Go (Golang) SQL query builders
-
18
sqlingo
A lightweight DSL to build SQL in Go.
456 stars 25 forkslast push 2026-04-01GoMIT
También en: #5 Go (Golang) SQL query builders
-
19
dbq
Zero boilerplate database operations for Go.
417 stars 20 forkslast push 2021-02-22GoNOASSERTION
También en: #6 Go (Golang) SQL query builders
-
20
sq
Type-safe SQL builder and struct mapper for Go.
200 stars 11 forkslast push 2023-01-15GoMIT
También en: #7 Go (Golang) SQL query builders
Compara lado a lado
| Licence | MIT | – |
|---|---|---|
| Style (ORM, code generator, query builder) | Full-featured ORM with associations and hooks | Code generator producing type-safe Go from SQL |
| Databases supported | MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, TiDB, Oracle (official drivers) | – |
| Migrations | AutoMigrate feature listed in README | – |
Referencias
- avelino/awesome-go: ORM and SQL Query Builders, GitHub community list (list text MIT; star counts from the GitHub API). Checked 2026-11-25 11:52 UTC.
- avelino/awesome-go (ORM, SQL Query Builders), GitHub community list, 50 tools with a public repository.
- GORM: licence, pkg.go.dev, checked 2026-11-18.
- GORM: style (orm, code generator, query builder), github.com, checked 2026-11-18.
- GORM: databases supported, gorm.io, checked 2026-11-18.
- sqlc: style (orm, code generator, query builder), docs.sqlc.dev, checked 2026-11-18.