go-pg
Golang ORM with focus on PostgreSQL features and performance (by go-pg)
SQLBoiler
Generate a Go ORM tailored to your database schema. (by volatiletech)
Our great sponsors
go-pg | SQLBoiler | |
---|---|---|
8 | 37 | |
5,318 | 5,563 | |
0.6% | 2.0% | |
5.8 | 8.9 | |
about 1 month ago | 8 days ago | |
Go | Go | |
BSD 2-clause "Simplified" License | BSD 3-clause "New" or "Revised" 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.
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 2022-07-02.
-
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?
-
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
-
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.
SQLBoiler
Posts with mentions or reviews of SQLBoiler.
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)?
SQL code generator (aka inspect a database or SQL files to generate data models). You have the option of using something like volatiletech/sqlboiler which looks at the a physical database and generates code based on the schema. Or SQLC which is an amazing and fast project.
-
Using Prisma Migrate with a Dockerized Postgres
After trying a half dozen migration engines for NodeJS, I was pleased to see Prisma and its excellent documentation. As a golang developer I am partial to SQLBoiler and its database-first approach, though perhaps this is a condition of our community where we want all the knobs. Prisma was code-first but still gave me enough control to feel confident.
-
Can anyone help me on how you are using golang with databases in production systems?
I use sqlboiler which generates an ORM from your database, and sql-migrate which is a tool for managing SQL migrations. Although you have to write your migrations in SQL, which IMHO is a plus.
-
Go overtook Ruby and ranked #3 among the most used backend languages for pull requests since 2021
FWIW, the other posts point to https://gobuffalo.io/ and https://github.com/volatiletech/sqlboiler as possibilities.
-
Go and PostgreSQL
My current favourite is: sqlboiler https://github.com/volatiletech/sqlboiler
-
ORM vs SQL Builder in Go
I love SQL Boiler, which generates type-safe code for you from the database schema.
-
Which ORM framework are you using with golang, and why?
SQLBoiler but currently building an evolved version with generics and more flexibility.
SQLBoiler it's fast and generates type-safe compile-able code.
-
Decent examples querying models from Postgres
Take a look at sqlboiler. It's an ORM that generates the database models for you based on the SQL schema.
-
Which framework and ORM should we choose?
I like sqlboiler. Generate a Go ORM based on your DB schema.
What are some alternatives?
When comparing go-pg and SQLBoiler you can also consider the following projects:
GORM - The fantastic ORM library for Golang, aims to be developer friendly
ent - An entity framework for Go
sqlc - Generate type-safe code from SQL
sqlx - general purpose extensions to golang's database/sql
upper.io/db - Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
bun - Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one.
beego orm
Xorm
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project