A type-safe SQL builder and code generator for Go that automatically maps query results to complex Go structures.
Jet is a comprehensive database access solution for Go that combines a type-safe SQL builder with automatic code generation and query result mapping. It enables developers to write complex SQL queries as Go code with compile-time safety and efficiently map results into arbitrarily nested Go structures, avoiding the overhead of traditional ORMs.
Go developers working with PostgreSQL, MySQL, SQLite, or compatible databases who need to write complex, type-safe SQL queries and map results into nested structures without the N+1 query problem.
Developers choose Jet for its compile-time type safety, elimination of boilerplate result mapping, and ability to execute complex queries with a single database call, offering better performance and developer efficiency compared to ORMs.
Type safe SQL builder with code generation and automatic query result data mapping
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enforces compile-time checking of column types and expressions, preventing bugs like comparing integer columns with strings, as demonstrated in the quick start WHERE clause.
Generates Go types and SQL builder code directly from database schema (tables, views, enums), eliminating manual boilerplate and ensuring schema sync.
Maps query results into arbitrarily nested Go structs with a single database call, avoiding N+1 query problems and improving performance, as shown in the quick start with nested actors and films.
Works with PostgreSQL, MySQL, SQLite, and compatible databases like CockroachDB and MariaDB, providing a unified interface across different systems.
Requires running the jet generator tool and regenerating code on schema changes, adding an extra step to the development and deployment workflow.
Lacks built-in ORM capabilities like migrations, automatic relationship handling, or caching, forcing developers to implement these separately.
Setup involves installing the generator, configuring database connections, and managing generated code directories, which can be more involved than simpler SQL libraries.