Are ORMs considered an anti-pattern in Go?

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

    An entity framework for Go

  • Hey, I may be a bit biased, because I am the creator of Ent. I don't think there's one true answer here. It depends on the problem you try to solve and the scope of your data layer, but these are my opinions based on my experience.

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

    SQL builder and query library for golang

  • This is the approach I've taken took, though instead of writing new helpers, I've preferred to use goqu. I've only been using the query building features, but it is excellent for it.

  • dhcplb

    dhcplb is Facebook's implementation of a load balancer for DHCP.

  • Squirrel

    Fluent SQL generation for golang

  • This is what I've been doing for the past 2 years. Repository pattern (in its own grpc/proto service) + sqlc. We also use squirrel in one or two places where we want to filter on certain objects in various ways and we'd end up with too many queries. But 95% of our repository service uses sqlc.

  • supabase

    The open source Firebase alternative.

  • However, there *are* senior engineers who think business logic can and should be stored in the database. I haven't played with it, but you may be interested to look at https://supabase.com/, which embraces that philosophy. They're building it on the back of postgres, with plans to take advantage of postgres' advanced features.

  • postgrest

    REST API for any Postgres database

  • There is nothing stopping you from taking the same approach when you put business logic in the database. You can, if you wish, create an 'api' schema that contains views and stored procedures through which the underlying database can be accessed. Same solution of an API layer, but centralised in the database so any service from any language can access the same window, but with more power and efficiency than going through an intermediary service. You can even expose it as a REST API using https://postgrest.org.

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

  • Prisma + ZenStack: An Alternative to PostgREST

    2 projects | dev.to | 24 Apr 2023
  • How to use Supabase RLS with third-party client library?

    2 projects | /r/Supabase | 17 Feb 2023
  • Querying SQL from React without a backend (bear with me here)

    5 projects | /r/reactjs | 27 Jun 2022
  • Business Logic Inside Database - How Evil Is It?

    3 projects | dev.to | 17 Apr 2023
  • Architecture Pitfalls: Don’t use your ORM entities for everything — embrace the SQL!

    5 projects | /r/programming | 12 Jan 2023