SHORTLIST20
日本語
Englishالعربية中文日本語한국어EspañolFrançaisहिन्दी
プログラミング

Go(Golang)ORM・SQLクエリビルダー トップ20

GORM, ent, sqlc, Squirrel, bun, goqu and other ways to talk to a SQL database from Go

更新 · GitHub stars (stars)

なぜこの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. 1

    GORM

    The fantastic ORM library for Golang, aims to be developer friendly.

    40,000 stars 4,240 forkslast push 2026-10-24GoMIT

    こちらにも: #1 Go (Golang) ORMs

  2. 2

    sqlc

    Generate type-safe code from SQL.

    18,497 stars 1,212 forkslast push 2026-11-23GoMIT

  3. 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. 4

    Squirrel

    Go library that helps you build SQL queries.

    7,987 stars 516 forkslast push 2024-04-24GoNOASSERTION

    こちらにも: #19 Go database tools and engines#1 Go (Golang) SQL query builders

  5. 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. 6

    bun

    SQL-first Golang ORM. Successor of go-pg.

    5,003 stars 323 forkslast push 2026-11-20GoBSD-2-Clause

    こちらにも: #2 Go (Golang) ORMs

  7. 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. 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

    こちらにも: #2 Go (Golang) SQL query builders

  9. 9

    gorp

    Go Relational Persistence, ORM-ish library for Go.

    3,742 stars 379 forkslast push 2024-11-19GoMIT

    こちらにも: #3 Go (Golang) ORMs

  10. 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

    こちらにも: #4 Go (Golang) ORMs

  11. 11

    goqu

    Idiomatic SQL builder and query library.

    2,676 stars 227 forkslast push 2026-11-19GoMIT

    こちらにも: #3 Go (Golang) SQL query builders

  12. 12

    bob

    SQL query builder and ORM/Factory generator for Go. Successor of SQLBoiler.

    1,805 stars 120 forkslast push 2026-11-22GoMIT

    こちらにも: #6 Go (Golang) ORMs

  13. 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

    こちらにも: #7 Go (Golang) ORMs

  14. 14

    pop/soda

    Database migration, creation, ORM, etc... for MySQL, PostgreSQL, and SQLite.

    1,528 stars 248 forkslast push 2026-11-21GoMIT

    こちらにも: #8 Go (Golang) ORMs

  15. 15

    reform

    Better ORM for Go, based on non-empty interfaces and code generation.

    1,453 stars 74 forkslast push 2026-10-19GoMIT

    こちらにも: #9 Go (Golang) ORMs

  16. 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

    こちらにも: #10 Go (Golang) ORMs

  17. 17

    ozzo-dbx

    Powerful data retrieval methods as well as DB-agnostic query building capabilities.

    674 stars 111 forkslast push 2026-10-27GoMIT

    こちらにも: #4 Go (Golang) SQL query builders

  18. 18

    sqlingo

    A lightweight DSL to build SQL in Go.

    456 stars 25 forkslast push 2026-04-01GoMIT

    こちらにも: #5 Go (Golang) SQL query builders

  19. 19

    dbq

    Zero boilerplate database operations for Go.

    417 stars 20 forkslast push 2021-02-22GoNOASSERTION

    こちらにも: #6 Go (Golang) SQL query builders

  20. 20

    sq

    Type-safe SQL builder and struct mapper for Go.

    200 stars 11 forkslast push 2023-01-15GoMIT

    こちらにも: #7 Go (Golang) SQL query builders

並べて比較

GORMsqlc
LicenceMIT–
Style (ORM, code generator, query builder)Full-featured ORM with associations and hooksCode generator producing type-safe Go from SQL
Databases supportedMySQL, PostgreSQL, GaussDB, SQLite, SQL Server, TiDB, Oracle (official drivers)–
MigrationsAutoMigrate feature listed in README–

測り方

Every library in the 'ORM' and 'SQL Query Builders' sections of the community list avelino/awesome-go on GitHub with a public GitHub repository, ranked by GitHub stars from the GitHub API; archived repositories are left out. Refreshed every 6 hours. Redis and Firestore stores (cacheme, go-store, Zoom, go-firestorm) and a struct generator for GORM (gormt) are left out; projects hosted outside GitHub (XORM on Gitea, Squalus on GitLab) have no comparable star count.

参考資料

  1. 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.
  2. avelino/awesome-go (ORM, SQL Query Builders), GitHub community list, 50 tools with a public repository.
  3. GORM: licence, pkg.go.dev, checked 2026-11-18.
  4. GORM: style (orm, code generator, query builder), github.com, checked 2026-11-18.
  5. GORM: databases supported, gorm.io, checked 2026-11-18.
  6. sqlc: style (orm, code generator, query builder), docs.sqlc.dev, checked 2026-11-18.