SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Go ORM Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. (by gogf)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server (by xo)
-
upper.io/db
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
-
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.
-
go-queryset
100% type-safe ORM for Go (Golang) with code generation and MySQL, PostgreSQL, Sqlite3, SQL Server support. GORM under the hood.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
GORM is a comprehensive ORM tool in Go, offering a code-first approach which allows defining database schemas using struct tags in Go. It's known for its developer-friendly nature, making it suitable for both beginners and experienced users. GORM supports a variety of SQL databases like MySQL, PostgreSQL, and SQLite. It's designed to be flexible, allowing developers to drop down to raw SQL when necessary. However, it's important to be cautious about its performance implications in large-scale applications.
In this article, we'll delve into the world of concurrency control in Go, specifically focusing on the optimistic locking approach. We'll explore its implementation using Ent ORM to illustrate how to manage data consistency when multiple users interact with the same resource. Keep in mind that this example serves as a simplified illustration, and real-world booking systems involve a many of additional complexities. However, the core concepts presented here provide a solid foundation for understanding optimistic locking in Go applications. Feel free to explore the complete source code in my GitHub repository for a more in-depth look at the implementation.
>> Also, I can think of a number of json schemas that are impossible to replicate in Go's type system but work just fine in PHP.
Not at all. There are some that would be painful to write "by hand". An expansive and nested set of null fields would suck if I had to spell it all out...
https://sqlc.dev << changes everything. If you add in the YAML (and I hate yaml) you can get your JSON to DB mapping in there, as well as your validations (all output as struct tags).
Everything else that you're going to want (transforming inputs to/from json, logging, auth) is some pretty simple middleware.
Project mention: Eradicating N+1s: The Two-Phase Data Load and Render Pattern in Go | news.ycombinator.com | 2024-05-28If 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
Project mention: Open-sourcing SQX, a way to build flexible database models in Go | news.ycombinator.com | 2023-09-02i like xo's approach https://github.com/xo/xo but it is as is. I would love if something similar comes along that is used by db practititoners that is actively used and supported.
For our luck, Prisma also has a Golang cli, so you can use it straight up.
Project mention: Prisma for Go vs. Node.js Prisma Client & GORM: Thoughts? | /r/golang | 2023-12-10
Go ORM related posts
-
TypeScript dev tools in the Golang world
-
Show HN: Riza – Safely run untrusted code from your app
-
Concurrency Control in Go with Ent ORM and MySQL
-
Give Up Sooner
-
Prisma Client Go: Typesafe Database Client for Golang
-
Go ORMs Compared
-
Stop using entgo...please
-
A note from our sponsor - SaaSHub
www.saashub.com | 3 Jun 2024
Index
What are some of the best open-source ORM projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | GORM | 35,771 |
2 | ent | 15,042 |
3 | sqlc | 11,288 |
4 | gf | 10,972 |
5 | SQLBoiler | 6,502 |
6 | Xorm | 6,204 |
7 | go-pg | 5,599 |
8 | gorp | 3,719 |
9 | xo | 3,584 |
10 | upper.io/db | 3,487 |
11 | bun | 3,359 |
12 | gormt | 2,324 |
13 | Storm | 2,043 |
14 | prisma-client-go | 1,979 |
15 | xorm | 1,551 |
16 | reform | 1,435 |
17 | gobuffalo/pop | 1,411 |
18 | go-doudou | 1,398 |
19 | go-sqlbuilder | 1,225 |
20 | gocqlx | 890 |
21 | REL | 743 |
22 | godb | 728 |
23 | go-queryset | 723 |
Sponsored