Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR. Learn more →
Top 23 Go ORM Projects
-
2. GORM
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Project mention: Pagoda: Rapid, easy full-stack web development starter kit in Go | news.ycombinator.com | 2024-09-29
> Ent heavily uses joins
I’m specifically talking about this: https://github.com/ent/ent/issues/977.
Devs assume that the `With` methods are adding join clauses but that is not typically the case.
> does support multi field indices
Composite primary keys are useful for reasons other than unique constraints and query speed. For example, CockroachDB uses the primary key to partition rows. Also, at scale, an extra multi-column index in addition to the primary key when the primary key alone could have sufficed can be a meaningful performance degradation.
> not a Graph DB under the hood
No it is not, but because it has a graph ‘mindset’ and does support Gremlin, traditional SQL folks expecting a lightweight ORM (such as Drizzle in the JS world) may not have a good time.
-
Next, let's write sql queries for retrieving our users & their permissions. Here we will use sqlc for type-safe code generation from our sql queries, and pgx as its backend
-
Project mention: gmap in GoFrame: A Deep Dive into High-Performance Concurrent Maps | dev.to | 2025-01-05
Performance Benchmarks
-
Project mention: Eradicating N+1s: The Two-Phase Data Load and Render Pattern in Go | news.ycombinator.com | 2024-05-28
If you're using Go, sqlboiler can do this for you in most common cases (e.g., fetch all the Users matching this filter, and for each User, fetch the related Company)
https://github.com/volatiletech/sqlboiler
-
-
Nutrient
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
-
-
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server (by xo)
XO doesn’t have them built-in, but it uses easily customizable templates.
I added support for a bunch of postgres fancy stuff in a previous app, it wasn’t too difficult
https://github.com/xo/xo
-
-
upper.io/db
Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
-
-
When I've used it in projects in the past its been through libraries like prisma-client-go. This is a really cool package. You define your schema, and run 1 command and you instantly have fully typed Go code to work with. I even used it to create a monitoring mobile app called Cronus.
-
-
xorm
xorm是一个简单而强大的Go语言ORM库,通过它可以使数据库操作非常简便。本库是基于原版xorm的定制增强版本,为xorm提供类似ibatis的配置文件及动态SQL支持,支持AcitveRecord操作 (by xormplus)
-
-
-
-
go-doudou
go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.
-
-
bob
SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite (by stephenafamo)
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go ORM discussion
Go ORM related posts
-
I made SQL easy in Go
-
gmap in GoFrame: A Deep Dive into High-Performance Concurrent Maps
-
Implementing WebSocket Communication and Heartbeat Mechanism with GoFrame: A Hands-on Guide
-
Show HN: Generate type-safe code for SQL queries in any language
-
Pagoda: Rapid, easy full-stack web development starter kit in Go
-
Store IoT device data
-
GORM, PostgreSQL & Atlas
-
A note from our sponsor - CodeRabbit
coderabbit.ai | 19 Feb 2025
Index
What are some of the best open-source ORM projects in Go? This list will help you:
# | Project | Stars |
---|---|---|
1 | GORM | 37,514 |
2 | ent | 15,872 |
3 | sqlc | 14,234 |
4 | gf | 11,985 |
5 | SQLBoiler | 6,804 |
6 | Xorm | 6,204 |
7 | go-pg | 5,702 |
8 | bun | 3,999 |
9 | xo | 3,775 |
10 | gorp | 3,738 |
11 | upper.io/db | 3,552 |
12 | gormt | 2,384 |
13 | prisma-client-go | 2,242 |
14 | Storm | 2,065 |
15 | xorm | 1,553 |
16 | go-sqlbuilder | 1,501 |
17 | gobuffalo/pop | 1,465 |
18 | reform | 1,442 |
19 | go-doudou | 1,185 |
20 | gocqlx | 944 |
21 | bob | 904 |
22 | REL | 776 |
23 | godb | 730 |