pq
Pure Go Postgres driver for database/sql (by lib)
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.
pq
Posts with mentions or reviews of pq.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-31.
- Ask HN: Slimvoice Alternative?
- Fly.io and Tailscale Saved Notado
- Restful API with Golang practical approach
-
Connect REST API to database with Go
Go’s standard library was not built to include any specific database drivers. So we need to install a third party package. In this case we are going to install https://github.com/lib/pq. Run following command:
-
Getting EOF when connecting to a database using sqlx
For Postgres the driver comes from "github.com/lib/pq" and then it is just "postgres".
-
Is this a proper setup in Go for a postgres api?
With regards to 2. -- also, it looks like there's an important unfixed issue https://github.com/lib/pq/issues/939. I haven't verified whether the issue is up to date.
-
Connect to postgres database using connection string?
Postgres (pure Go): https://github.com/lib/pq [*]Postgres (uses cgo): https://github.com/jbarham/gopgsqldriver Postgres (pure Go): https://github.com/jackc/pgx [*]
-
Golang future web frameworks!
lib/pq 7.3k Stars, Used by 63k
-
psql driver that supports the sql.NamedArgs & sql.Named?
I am using the lib/pq driver. is there a driver that does allow for this syntax or is there something I can change?
- Why all the hate?
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-03-15.
- Is sqlx still maintained?
-
Golang tech stack
sqlx
-
What framework to build heavy i/o rest api?
If you care about performance you might want to avoid an ORM all together and just write out the queries you need. We use sqlx in those cases.
- Java é o novo Javascript do momento?
-
GORM
or in general for accessing databases? * sqlx: general purpose extensions to database/sql * sqlc: generate type safe code from queries * squirrel: fluent SQL generator
-
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)
What are some alternatives?
When comparing pq and sqlx you can also consider the following projects:
pgx - PostgreSQL driver and toolkit for Go
sqlc - Generate type-safe code from SQL
Squirrel - Fluent SQL generation for golang
gomock - GoMock is a mocking framework for the Go programming language.
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.
ent - An entity framework for Go
migrate - Database migrations. CLI and Golang library.
go-pg - Golang ORM with focus on PostgreSQL features and performance
go-sqlite3 - sqlite3 driver for go using database/sql