Search for a command to run...
Full-featured ORM library for Go that maps structs to database tables and provides a fluent API for queries, associations, and migrations. Supports SQLite, MySQL, PostgreSQL, and SQL Server through pluggable drivers, with auto-migration from struct definitions and a type-safe generics API introduced in v1.30.
Backed by sponsors such as Encore.dev, incident.io, and Bytebase. Compared to lighter alternatives like sqlx or sqlc, GORM offers a conventional ActiveRecord-style API with associations, hooks, and eager loading out of the box, while remaining extensible via plugins for read-write splitting, Prometheus metrics, and multi-database resolution.
Core capabilities:
Well suited for Go services that need rapid schema evolution and rich relationship handling without hand-written SQL. Fits microservices and APIs where struct-based models, migrations, and transaction support reduce boilerplate. Integrates cleanly with standard Go idioms, context propagation, and prepared statement mode for production workloads.