
About GORM
GORM is an open source ORM library for the Go programming language. It maps Go structs to database tables and offers a fluent API for queries, associations and transactions.
What it does
GORM lets you define models as Go structs and run create, read, update and delete operations against a database. It supports has-one, has-many, belongs-to and many-to-many relations, plus eager loading with Preload and Joins. Hooks run before or after create, save, update, delete and find operations. It also includes transactions with save points, auto migrations and a plugin API, such as a database resolver for splitting reads and writes.
Key features
- Struct-based models and associations
- Hooks around create, update and delete
- Transactions with save points
- Auto migrations for schema changes
- Plugin API for extra database features
Who it's for
Go developers who want a productive ORM without writing every SQL statement by hand. It fits web services and APIs that use relational databases.
Pricing and good to know
GORM is free and open source under the MIT license. Its documentation is available in many languages and is licensed under CC BY 4.0. Auto migrations are convenient, but review the generated changes before you use them in production.
Highlights
- Struct-based models and associations
- Hooks that run around create, update and delete
- Transactions with save points
- Auto migrations for schema changes
- Plugin API for extra database features












