GORM
The fantastic ORM library for Golang, aims to be developer friendly (by go-gorm)
go-pg
Golang ORM with focus on PostgreSQL features and performance (by go-pg)
GORM | go-pg | |
---|---|---|
76 | 9 | |
35,840 | 5,607 | |
1.0% | 0.4% | |
8.4 | 6.3 | |
6 days ago | 19 days ago | |
Go | Go | |
MIT License | BSD 2-clause "Simplified" License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
GORM
Posts with mentions or reviews of GORM.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-06-14.
-
Scaling Backend to 1M requests with just 2GB ram ⚡️
Written in GIN framework and uses GORM as ORM.
-
How to handle migrations in Golang
There are ORMs like gorm that supports some kind of documentation with files, but they mainly focus on converting the database to "things" in the code to be used by the ORM, and not as documentation only/documentation-first.
-
Go ORMs Compared
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.
-
6 🔥 Awesome Golang packages (web devs)
Homepage: https://gorm.io/
- Tenha controle sobre seu SQL com Golang e SQLC
- Não use funções puras com Go
-
Build an Event-Driven Uptime Monitor in Go 🚀
Since most of these APIs will be simple CRUD (Create/Read/Update/Delete) endpoints, let's build this service using GORM, an ORM library that makes building CRUD endpoints really simple.
- [OpenSource] I am building high performance Plex alternative in Go for Movies and TV Show
-
Building Robust Applications in Go: Integrating Envconfig, Gorm, and OpenSearch
After successfully configuring the application, it's time to delve into integrating the data layer. For this purpose, I will utilize gorm, a powerful SQL ORM that facilitates rapid development of the data layer using model structs.
-
ORM or no ORM that is the question
For basic INSERT ... VALUES ... or SELECT ... WHERE ... JOIN ..., use a library such as GORM. For INSERT .... SELECT ... statements where one combines two round trips (SELECT and INSERT) into one, ORMs have a hard time performing this query. Particularly when you start doing joins. Joins are the heart of Relational database theory (they denote relationships). So get to know what an INNER, LEFT, RIGHT and OUTER join is and why you would use them. Also learn INSERT ... SELECT ...
go-pg
Posts with mentions or reviews of go-pg.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-12.
-
Dockerized RESTful API Application in Go: CRUD,ORM,Logs,Migrations,Validations
Might have been this one but I can't be sure https://github.com/go-pg/pg
-
What SQL library are you using?
I usually work with PostgreSQL and have used https://github.com/go-pg/pg. https://github.com/uptrace/bun is its successor.
- Why all the hate?
-
Clean Transactions in Golang Hexagon
And it is go-pg. I personally really like it as a query builder (rather than an ORM) and it has good performance. It has one feature which I'll tell you about next, without which I would have struggled to implement what I had in mind. But this feature is available in other libraries too, so don't rush to rewrite your code.
-
SQL Query Strategy for complex structs
bun and go-pg both seem to work fairly well for these kind of purposes.
- Go for Backend development
-
Connecting with database
For database communication we will use go-pg module. You can install it by running go get github.com/go-pg/pg/v10. This will install version 10 of go-pg module, which is latest version at the time of writing this guide. Now create new directory internal/database/ and file database.go inside of it.
-
How much do you agree completely switching from Java to Go? I have total 9yrs of experience in Java but now I am interested in Go.
gorm.io/gorm`, or `github.com/go-pg/pg` if you need something more feature-rich. I would avoid using `go-kit` and `go-micro` "frameworks" unless you have some special requirement for it. But you can take a look to have an idea of what Go "framework" may look like.
-
A Proposal for Adding Generics to Go
This one is mostly excellent: https://github.com/go-pg/pg
What are some alternatives?
When comparing GORM and go-pg you can also consider the following projects:
ent - An entity framework for Go
bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Xorm
SQLBoiler - Generate a Go ORM tailored to your database schema.
pgx - PostgreSQL driver and toolkit for Go
sqlx - general purpose extensions to golang's database/sql
beego orm
bun - SQL-first Golang ORM
gorp - Go Relational Persistence - an ORM-ish library for Go