Go ORM

Open-source Go projects categorized as ORM

Top 23 Go ORM Projects

  1. GORM

    The fantastic ORM library for Golang, aims to be developer friendly

    Project mention: Top 5 Go Libraries Every Backend Developer Should Know | dev.to | 2025-01-03

    2. GORM

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. ent

    An entity framework for Go

    Project mention: Pagoda: Rapid, easy full-stack web development starter kit in Go | news.ycombinator.com | 2024-09-29

    > Ent heavily uses joins

    I’m specifically talking about this: https://github.com/ent/ent/issues/977.

    Devs assume that the `With` methods are adding join clauses but that is not typically the case.

    > does support multi field indices

    Composite primary keys are useful for reasons other than unique constraints and query speed. For example, CockroachDB uses the primary key to partition rows. Also, at scale, an extra multi-column index in addition to the primary key when the primary key alone could have sufficed can be a meaningful performance degradation.

    > not a Graph DB under the hood

    No it is not, but because it has a graph ‘mindset’ and does support Gremlin, traditional SQL folks expecting a lightweight ORM (such as Drizzle in the JS world) may not have a good time.

  4. sqlc

    Generate type-safe code from SQL

    Project mention: User authentication in go | dev.to | 2025-01-30

    Next, let's write sql queries for retrieving our users & their permissions. Here we will use sqlc for type-safe code generation from our sql queries, and pgx as its backend

  5. gf

    A powerful framework for faster, easier, and more efficient project development.

    Project mention: gmap in GoFrame: A Deep Dive into High-Performance Concurrent Maps | dev.to | 2025-01-05

    Performance Benchmarks

  6. SQLBoiler

    Generate a Go ORM tailored to your database schema.

    Project mention: Eradicating N+1s: The Two-Phase Data Load and Render Pattern in Go | news.ycombinator.com | 2024-05-28

    If you're using Go, sqlboiler can do this for you in most common cases (e.g., fetch all the Users matching this filter, and for each User, fetch the related Company)

    https://github.com/volatiletech/sqlboiler

  7. Xorm

  8. go-pg

    Golang ORM with focus on PostgreSQL features and performance

  9. Nutrient

    Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.

    Nutrient logo
  10. bun

    SQL-first Golang ORM (by uptrace)

  11. xo

    Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server (by xo)

    Project mention: Sqlc: Compile SQL to type-safe code | news.ycombinator.com | 2024-09-08

    XO doesn’t have them built-in, but it uses easily customizable templates.

    I added support for a bunch of postgres fancy stuff in a previous app, it wasn’t too difficult

    https://github.com/xo/xo

  12. gorp

    Go Relational Persistence - an ORM-ish library for Go

  13. upper.io/db

    Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

  14. gormt

    database to golang struct

  15. prisma-client-go

    Prisma Client Go is an auto-generated and fully type-safe database client

    Project mention: I made SQL easy in Go | dev.to | 2025-02-02

    When I've used it in projects in the past its been through libraries like prisma-client-go. This is a really cool package. You define your schema, and run 1 command and you instantly have fully typed Go code to work with. I even used it to create a monitoring mobile app called Cronus.

  16. Storm

    Simple and powerful toolkit for BoltDB (by asdine)

  17. xorm

    xorm是一个简单而强大的Go语言ORM库,通过它可以使数据库操作非常简便。本库是基于原版xorm的定制增强版本,为xorm提供类似ibatis的配置文件及动态SQL支持,支持AcitveRecord操作 (by xormplus)

  18. go-sqlbuilder

    A flexible and powerful SQL string builder library plus a zero-config ORM.

  19. gobuffalo/pop

    A Tasty Treat For All Your Database Needs (by gobuffalo)

  20. reform

    A better ORM for Go, based on non-empty interfaces and code generation. (by go-reform)

  21. go-doudou

    go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

  22. gocqlx

    All-In-One: CQL query builder, ORM and migration tool

  23. bob

    SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite (by stephenafamo)

    Project mention: You Probably Don't Need Query Builders | news.ycombinator.com | 2025-01-25
  24. REL

    :gem: Modern ORM for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API

  25. godb

    A Go SQL query builder and struct mapper.

  26. SaaSHub

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

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go ORM discussion

Log in or Post with

Go ORM related posts

  • I made SQL easy in Go

    2 projects | dev.to | 2 Feb 2025
  • gmap in GoFrame: A Deep Dive into High-Performance Concurrent Maps

    1 project | dev.to | 5 Jan 2025
  • Implementing WebSocket Communication and Heartbeat Mechanism with GoFrame: A Hands-on Guide

    1 project | dev.to | 16 Dec 2024
  • Show HN: Generate type-safe code for SQL queries in any language

    2 projects | news.ycombinator.com | 27 Nov 2024
  • Pagoda: Rapid, easy full-stack web development starter kit in Go

    2 projects | news.ycombinator.com | 29 Sep 2024
  • Store IoT device data

    2 projects | dev.to | 26 Sep 2024
  • GORM, PostgreSQL & Atlas

    4 projects | dev.to | 12 Aug 2024
  • A note from our sponsor - CodeRabbit
    coderabbit.ai | 19 Feb 2025
    Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR. Learn more →

Index

What are some of the best open-source ORM projects in Go? This list will help you:

# Project Stars
1 GORM 37,514
2 ent 15,872
3 sqlc 14,234
4 gf 11,985
5 SQLBoiler 6,804
6 Xorm 6,204
7 go-pg 5,702
8 bun 3,999
9 xo 3,775
10 gorp 3,738
11 upper.io/db 3,552
12 gormt 2,384
13 prisma-client-go 2,242
14 Storm 2,065
15 xorm 1,553
16 go-sqlbuilder 1,501
17 gobuffalo/pop 1,465
18 reform 1,442
19 go-doudou 1,185
20 gocqlx 944
21 bob 904
22 REL 776
23 godb 730

Sponsored
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai