GORM
gorm.io
3
Leaving SiteNav
External Link Disclaimer
You are about to visit gorm.io. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
GORM is the most popular object-relational mapping (ORM) library for the Go programming language, providing a full-featured, developer-friendly API for database operations. Created by Jin Zhang (jinzhu) and first released in 2013, GORM has accumulated over 37,000 GitHub stars and is used by tens of thousands of Go projects worldwide. The current major version, GORM v2, was completely rewritten with improved performance, better extensibility, and a context-aware API. GORM supports all major relational databases including MySQL, PostgreSQL, SQLite, SQL Server, ClickHouse, and TiDB through driver-specific dialects. Key features include full CRUD operations with method chaining, advanced association handling (has one, has many, belongs to, many to many, polymorphism, single-table inheritance), automatic eager loading via Preload and Joins, transaction support including nested transactions with save points and rollback to saved point, context support with prepared statement mode and dry run mode for SQL debugging, batch insert, find in batches, find or create with map, CRUD with SQL expressions, raw SQL support, struct mapping with custom column names and embedded structs, auto migration for schema management, SQL builder for complex queries, hook system with before and after callbacks for create, save, update, delete, and find operations, plugin ecosystem for pagination, optimistic locking, Prometheus metrics, and database resolver for read/write splitting. GORM also provides a code generation tool (gen) for type-safe queries and a CLI tool for project scaffolding. The project is available under the MIT License.
Statistics
3
Views
0
Clicks
0
Like
0
Dislike