Are there any decent ORMs in Golang?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. scany

    Library for scanning data from a database into Go structs and more

    When I don't use one, I'm typically using SQLx or (if using Postgres) pgx with scany https://github.com/georgysavva/scany (slightly better API than SQLx and great performance since you can use the native interface from pgx if desired whereas many database drivers only offer the text-based interface).

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. ent

    An entity framework for Go

    I think the best ORM in Go is Ent: https://entgo.io/ It has great docs, great migration capabilities, and is well run with professional staff. The only downside is that some people don't like the approach of code generation.

  4. goose

    A database migration tool. Supports SQL migrations and Go functions. (by pressly)

  5. sqlc

    Generate type-safe code from SQL

    I have been using: https://sqlc.dev/ With pgx for Postgres and liking it so far. It does code generation. But seems pretty easy to maintain. And there is no reflection at runtime, so performance is good.

  6. SQLBoiler

    Generate a Go ORM tailored to your database schema.

    sqlboiler

  7. Squirrel

    Fluent SQL generation for golang

    But using a query builder, something like squirrel or (plug) bqb, allows you to actually write SQL (or something close to it) when you need it but also handles the nasty string building bits. Though I agree that ORMs are not always bad, especially for small projects with well-defined scope.

  8. bqb

    BQB is a lightweight and easy to use query builder that works with sqlite, mysql, mariadb, postgres, and others.

    But using a query builder, something like squirrel or (plug) bqb, allows you to actually write SQL (or something close to it) when you need it but also handles the nasty string building bits. Though I agree that ORMs are not always bad, especially for small projects with well-defined scope.

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Yes or No on ORMs???

    2 projects | /r/golang | 20 Jul 2021
  • Sqlc: Generate type-safe code from SQL

    1 project | news.ycombinator.com | 16 Apr 2025
  • sqlc: Type-Safe Querying in Go

    1 project | dev.to | 16 Mar 2025
  • Goravel: A Go framework inspired by Laravel

    9 projects | news.ycombinator.com | 9 Mar 2025
  • You Probably Don't Need Query Builders

    5 projects | news.ycombinator.com | 25 Jan 2025

Did you know that Go is
the 4th most popular programming language
based on number of references?