A lightweight, fast, customizable, and type-safe object-relational mapper for Go, leveraging generics and reflection.
GoLobby ORM is an object-relational mapper for Go that simplifies database interactions by mapping database tables to Go structs (entities). It provides a type-safe, fast, and customizable way to perform CRUD operations, manage relationships, and build complex queries without code generation.
Go developers building applications that require efficient and type-safe database access, particularly those who prefer avoiding code generation and want a lightweight ORM with modern Go features like generics.
Developers choose GoLobby ORM for its performance (using reflection only at startup), type safety via generics, and flexibility—offering a full-featured query builder and relationship support while remaining lightweight and easy to customize.
A lightweight yet powerful, fast, customizable, type-safe object-relational mapper for the Go programming language.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Go generics for compile-time safety in queries, as shown in the README with functions like orm.Find[User](1) that prevent runtime type errors.
Benchmarks in the README show it outperforms GORM with lower allocs/op, as reflection is only used during initialization to minimize overhead.
Handles one-to-one, one-to-many, and many-to-many associations with configurable mappings, demonstrated through HasMany, HasOne, BelongsTo, and BelongsToMany methods.
Offers chainable methods for SELECT, UPDATE, and DELETE queries, including complex conditions like WhereIn and OrderBy, as detailed in the Query Builder section.
Optionally validates that database schemas match entity definitions to prevent sync issues, enabled via the DatabaseValidations flag in ConnectionConfig.
Only supports SQLite, MySQL, MariaDB, and PostgreSQL, excluding other relational databases like Oracle or SQL Server, which may require workarounds.
The README lacks mention of migration tools, forcing developers to manage schema changes separately, unlike ORMs that include migration features.
Relies on reflection for entity configuration, which, while optimized for startup, can lead to runtime errors if entities are misconfigured or change without validation.
Deviating from conventions requires explicit field settings in ConfigureEntity, which can be tedious for large or legacy projects with non-standard column names.