pgx
PostgreSQL driver and toolkit for Go (by jackc)
sqlx
general purpose extensions to golang's database/sql (by jmoiron)
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.
sqlx
Posts with mentions or reviews of sqlx.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-17.
-
ORM or no ORM (and which ones)?
https://github.com/jmoiron/sqlx and github.com/lib/pq are pretty solid, this is what i go to.
-
Does Go need overcoding for tasks that other languages can execute in one liners (or with less code)?
The amount of packages imported is kind of a thing I want to remove. There is, for example, MySQL package but I use PG. Also, for many things I need sqlx, sometimes database/sql + carta. I would love to standardize all my database handling to make it simple, concise, and efficient;
-
Creating an API using Go and sqlc
Implement the Repository interface by writing the queries in code, perhaps using some solution like Squirrel or sqlx.
-
How do you handle scanning of db.Rows?
Hey, have you looked at sqlx?
-
Restful API with Golang practical approach
sqlx: sqlx is a library which provides a set of extensions on go's standard database/sql library. (https://github.com/jmoiron/sqlx)
-
Best packages?
sqlx for database connections. It allows scanning into structs which saves a lot of time and is easier to use.
-
Go w/ MSSQL - Experiences?
I typically use sqlx to deal with query results.
-
Dapper-like ORM, Mapping
Beyond that, as others have suggested, sqlx is very close to dapper in terms of functionality. It’s not generic, but generics don’t actually get you anything here except dapper will instantiate the types for you while with sqlx you have to do it yourself. Under the hood, both must use reflection to map fields.
You could try https://github.com/jmoiron/sqlx. Not sure it will satisfy your usecase to the point, but it is easy to work with wrapper of database/sql and provides some nice mappings. Take a look at https://jmoiron.github.io/sqlx/ for some more advanced use cases than just githubs README.
-
Looking for some PgSQL infos
If it is to low-level for your liking maybe take a look at sqlx or even gorm.
What are some alternatives?
When comparing pgx and sqlx you can also consider the following projects:
sqlc - Generate type-safe code from SQL
pq - Pure Go Postgres driver for database/sql
GORM - The fantastic ORM library for Golang, aims to be developer friendly
gomock - GoMock is a mocking framework for the Go programming language.
Squirrel - Fluent SQL generation for golang
go-sql-driver/mysql - Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package
SQLBoiler - Generate a Go ORM tailored to your database schema.
migrate - Database migrations. CLI and Golang library.
goqu - SQL builder and query library for golang