pgx
PostgreSQL driver and toolkit for Go (by jackc)
GORM
The fantastic ORM library for Golang, aims to be developer friendly (by go-gorm)
Our great sponsors
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.
pgx
Posts with mentions or reviews of pgx.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-18.
-
Can anyone help me on how you are using golang with databases in production systems?
Is it better to use tools like [pgx](https://github.com/jackc/pgx) or stick with a ORM like GORM.
- One Million Database Connections
- Go and PostgreSQL
-
Dapper-like ORM, Mapping
If your schema/migrations are not part of the go project then it might not be a great fit. It does support pgx which is a huge advantage imo vs plain database/sql.
-
Looking for some PgSQL infos
The Wiki doesn't help to get you started?
-
Is this a proper setup in Go for a postgres api?
Regarding postgres setup, it looks ok, I recommend considering pgx instead of libpq; reason being maintainability, libpq even recommends using pgx instead see README.
-
Building a Simple TODO App with Gin-gonic in Zerops: A step-by-step Guide
github.com/jackc/pgx/v4 (v4.17.1)
-
pgx is awesome: introducing pg_idkit
Is it related to https://github.com/jackc/pgx somehow?
-
Go EventSourcing and CQRS with PostgreSQL, Kafka, MongoDB and ElasticSearch 👋✨💫
PostgeSQL as event store database Kafka as messages broker gRPC Go implementation of gRPC Jaeger open source, end-to-end distributed tracing Prometheus monitoring and alerting Grafana for to compose observability dashboards with everything from Prometheus MongoDB MongoDB database Elasticsearch Elasticsearch client for Go. Echo web framework Kibana Kibana is data visualization dashboard software for Elasticsearch Migrate for migrations
-
How learn backend for frontend dev?
I'd stick with this approach rather than trying to learn Gorm as well. Simple is really your friend at this point. Note that because you aren't using Gorm you will need some other way of creating your tables. The simplest way of doing this is just to execute SQL table creation DDL statements manually using `psql`. There are separate migration packages for Go, but all that can come later I think. Note also that the old `pq` driver for Postgres is in maintenance mode, so maybe look at https://github.com/jackc/pgx which seems to be the recommended way of connecting to Postgres going forward.
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 2023-01-25.
- How do you handle nil/null values correctly
-
ORM or no ORM (and which ones)?
Hello, I want to communicate with a database in my go API. My API is for a website that allows you to track finances and budgets, so the reason I need a database is to store the user's expenses and allow them to search and find each one and which one is costing them the most. I also am going to implement login soon, but I don't think that matters for now. I'm now stuck on how to communicate with my database (Postgres). Should I go with an ORM like gorm, database/sql package, sqlx, or any others? Advice is appreciated
-
Web Development JWT Practices
For more information on Gorm's operation of MySQL, please refer to Gorm
- High Performance Web Framework Tasting-Database Operations
-
Build REST API with Go Fiber and PlanetScale - Part 1
To access PlanetScale, we can use ORM from Go called Gorm, and since the PlanetScale database is built on top Vitess (MySQL), install the MySQL driver as well.
-
Dapper-like ORM, Mapping
Just my opinion, so it it for what it’s worth to you, but I haven’t been especially impressed with the ORM landscape in Go. I have tinkered with a few ORMs - I gave gorm a serious whirl a few months ago, but ended up ditching it in less than a month. If time is on your side, I’d strongly encourage you to experiment with what the standard library’s database/sql package has to offer.
-
Looking for some PgSQL infos
If it is to low-level for your liking maybe take a look at sqlx or even gorm.
-
using go-sqlmock with sqlite
Sigh... If you're using gorm V2, you need to pass a dialector to gorm.Open as the first parameter. See the V2 example here: https://github.com/go-gorm/gorm/issues/3565
-
Which framework and ORM should we choose?
Framework - Gin ORM - Gorm
What are some alternatives?
When comparing pgx and GORM you can also consider the following projects:
ent - An entity framework for Go
Xorm
SQLBoiler - Generate a Go ORM tailored to your database schema.
go-pg - Golang ORM with focus on PostgreSQL features and performance
sqlx - general purpose extensions to golang's database/sql
beego orm
pq - Pure Go Postgres driver for database/sql
gorp - Go Relational Persistence - an ORM-ish library for Go
sqlc - Generate type-safe code from SQL
xorm - xorm是一个简单而强大的Go语言ORM库,通过它可以使数据库操作非常简便。本库是基于原版xorm的定制增强版本,为xorm提供类似ibatis的配置文件及动态SQL支持,支持AcitveRecord操作
bun - Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one.
upper.io/db - Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.