Are there any decent ORMs in Golang?

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

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • 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).

  • 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.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • goose

    A database migration tool. Supports SQL migrations and Go functions.

  • 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.

  • SQLBoiler

    Generate a Go ORM tailored to your database schema.

  • sqlboiler

  • 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.

  • 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.

  • 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
  • Show HN: Riza – Safely run untrusted code from your app

    1 project | news.ycombinator.com | 30 Apr 2024
  • Give Up Sooner

    1 project | dev.to | 13 Mar 2024
  • DBeaver – open-source Database client

    10 projects | news.ycombinator.com | 10 Mar 2024
  • We built our customer data warehouse all on Postgres

    16 projects | news.ycombinator.com | 2 Feb 2024