reform VS GORM

Compare reform vs GORM and see what are their differences.


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


The fantastic ORM library for Golang, aims to be developer friendly (by go-gorm)
Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
reform GORM
1 39
1,251 28,056
1.5% 2.6%
4.8 9.3
24 days ago 6 days ago
Go Go
MIT License MIT 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.


Posts with mentions or reviews of reform. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-29.


Posts with mentions or reviews of GORM. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-14.
  • Go Echo API Server Development
    4 projects | | 14 May 2022
    db operation from apps by gorm
  • Alternative to MongoDB?
    9 projects | | 12 May 2022
    If you want some "developer experience", look at
  • Python/Django to Golang questions
    13 projects | | 6 May 2022
  • Multitenant application with golang and gorm
    1 project | | 1 May 2022
    "" "" gocache "" ) var cacheHandler *gocache.Cache type StoreDB struct { CreationMutex sync.Mutex cache *gocache.Cache } type Context struct { Schema string } func (s *StoreDB) CreateDBHandler(ctx *Context) *gorm.DB { // Maybe we could use a better mechanism to do this. s.CreationMutex.Lock() defer s.CreationMutex.Unlock() // Double check before moving to Creation precedures if db, found := s.cache.Touch(ctx.Schema, gocache.DefaultExpiration); found { return db.(*gorm.DB) } dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s sslmode=disable search_path=%s", getEnv("DB_HOST", "db"), getEnv("DB_USER", "postgres"), getEnv("DB_PASSWORD", "example"), getEnv("DB_NAME", "some-database"), ctx.Schema) db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{}) if err != nil { panic(err) } cacheHandler.Set(ctx.Schema, db, gocache.DefaultExpiration) return db } func (s *StoreDB) GetDBHandler(ctx *Context) *gorm.DB { db, found := s.cache.Touch(ctx.Schema, gocache.DefaultExpiration) if found { return db.(*gorm.DB) } return s.CreateDBHandler(ctx) } func initManager() *StoreDB { cacheHandler = gocache.New(10*time.Minute, 10*time.Minute) cacheHandler.OnEvicted(func(s string, i interface{}) { // sql, err := i.(*gorm.DB).DB() if err != nil { panic(err) } sql.Close() }) return &StoreDB{ cache: cacheHandler, } }
  • The Power of Generics in Go: The Repository pattern for GORM
    2 projects | | 22 Apr 2022
    I agree with /u/in_the_cloud that in principle it would be nicer to push that all the way into GORM itself. Perhaps it's time for a major revision branch there. There is an issue discussing generics but it seems like the beginning of a beginning of a conversation about it. It'll definitely be some work; I can virtually guarantee several passes will be necessary before a 2.x release will be possible. If nothing else, there's the initial conversion which just propagates the generics around, and then a second pass when staring at the end result shows the new ways it can be used to simplify things.
  • Which database do you recommend to be used with Golang?
    3 projects | | 5 Apr 2022
    I use with mariadb
  • Most recommended database migration tool? using golang for the record
    11 projects | | 4 Apr 2022
  • Any Tips for Go Newcomer?
    1 project | | 29 Mar 2022
  • Looking for some ORM/db access layer suggestions
    10 projects | | 20 Mar 2022
  • Golang Oracle DB Example
    4 projects | | 2 Mar 2022

What are some alternatives?

When comparing reform and GORM you can also consider the following projects:

ent - An entity framework for Go


SQLBoiler - Generate a Go ORM tailored to your database schema.

go-pg - Golang ORM with focus on PostgreSQL features and performance

beego orm

gorp - Go Relational Persistence - an ORM-ish library for Go

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

pgx - PostgreSQL driver and toolkit for Go - Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

sqlc - Generate type-safe code from SQL

pop/soda - A Tasty Treat For All Your Database Needs

Squirrel - Fluent SQL generation for golang