Generate a type-safe Go ORM from your existing database schema using a database-first approach.
SQLBoiler is a Go ORM generator that produces type-safe, high-performance Go code directly from an existing database schema. It follows a database-first philosophy, requiring you to define your schema using migrations before generating models, which ensures the generated code closely matches your database structure and eliminates manual mapping boilerplate.
Go developers working with PostgreSQL, MySQL, MSSQL, SQLite, or CockroachDB who need a type-safe, high-performance ORM that mirrors an existing database schema without requiring code-first definitions.
Developers choose SQLBoiler for its combination of ActiveRecord-like productivity with Go-like performance and type safety, offering compile-time safety with generated identifiers, first-class relationship support with eager loading, and performance comparable to hand-rolled SQL, while eliminating repetitive SQL boilerplate.
Generate a Go ORM tailored to your database schema.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates compile-time identifiers for tables, columns, and relationships, eliminating string-based errors and ensuring queries match the database schema exactly.
Optimized hot-paths and intelligent caching perform comparably to hand-rolled SQL, as demonstrated in the project's benchmarks section.
Produces Go models directly from an existing database schema via migrations, removing manual mapping boilerplate and keeping code in sync with the database.
Offers first-class to-one and to-many relationships with eager loading capabilities, simplifying complex data retrieval without N+1 query issues.
The project is in maintenance mode, meaning no new features, limited maintainer involvement, and reliance on community for bug fixes, which risks long-term stagnation.
Demands specific database conventions like composite primary keys for join tables and foreign key columns ending in '_id', making it incompatible with many legacy or unconventional schemas.
Requires detailed TOML configuration for aliases, templates, and driver settings, which can be overwhelming for newcomers and slow down initial setup.