jet
Jet is a Go-based type-safe SQL query builder with code generation that maps database schemas to Go types and automatically binds query results. It supports PostgreSQL, MySQL, SQLite, and compatible databases like CockroachDB and MariaDB, eliminating SQL string construction and manual result mapping.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | go-jet/jet |
| Owner | go-jet |
| Primary language | Go |
| License | Apache-2.0 — OSI-approved |
| Stars | 3.7k |
| Forks | 185 |
| Open issues | 42 |
| Latest release | v2.15.0 (2026-05-21) |
| Last updated | 2026-06-22 |
| Source | https://github.com/go-jet/jet |
What jet is
Jet generates strongly-typed SQL builder packages and data model types from database schema metadata. It provides compile-time query validation, supports complex SELECT/INSERT/UPDATE/DELETE statements with CTEs, window functions, and subqueries, and handles result mapping to arbitrary Go struct compositions without reflection overhead.
Get the jet source
Clone the repository and explore it locally.
git clone https://github.com/go-jet/jet.gitcd jet# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Code generation must be run each time schema changes; integrate into build pipeline (e.g., go generate) to keep types in sync and avoid stale generated code.
- Requires active database connection during generation; user must have schema inspection permissions; credential management and environment-specific generation (dev/staging/prod schemas) must be planned.
- Generated files should be committed to source control; set up .gitignore and code generation scripts to ensure team consistency and CI/CD reproducibility.
- Result mapping uses struct tags and field name matching; ensure generated model struct tags align with your JSON/API serialization requirements or add custom marshaling.
- Minimum Go 1.24+ required; review compatibility with your Go version policy and upgrade path before adoption.
When to avoid it — and what to weigh
- Need full ORM features (relationships, eager loading, transactions abstraction) — Jet explicitly is not an ORM. It lacks built-in relationship management, lazy/eager loading patterns, and transaction context helpers. GORM or sqlc may be better fits for complex domain models.
- Prefer raw SQL files for version control and DBA review — Jet generates SQL at runtime in Go code. Teams that need SQL as versioned artifacts for audit trails or DBA sign-off may prefer tools like migrate or Liquibase paired with traditional query builders.
- Require dynamic schema introspection or multi-tenant schema switching — Jet code generation happens at build time from a single connected database. Projects requiring runtime schema switching or ad-hoc introspection will need custom wrappers or alternative approaches.
- Working with heavily legacy databases with irregular naming or undocumented types — Code generation assumes well-formed schemas with clear type mappings. Legacy databases with non-standard naming, custom types, or metadata inconsistencies may require significant manual post-generation fixes.
License & commercial use
Apache License 2.0 (Apache-2.0). Permissive OSI-approved license allowing commercial use, modification, and distribution with minimal restrictions. Requires preservation of license and copyright notices.
Apache-2.0 is a permissive license that explicitly permits commercial use. No proprietary restrictions or commercial licensing fees. Suitable for commercial products. Ensure LICENSE file is included in distributions.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Jet generates parameterized queries using prepared statement placeholders, reducing SQL injection risk. However, security depends on correct use: ensure user input is passed as query parameters, not concatenated into WHERE clauses. Generated code does not enforce this. No external security audit data provided. Review custom generator configuration if modifying generated code output.
Alternatives to consider
sqlc
Similar code generation approach but queries are written in SQL files. Better for teams wanting SQL versioning and DBA review; less idiomatic Go syntax for query building.
GORM
Full ORM with relationship management, hooks, and migrations. More opinionated and heavier; suitable if you need rich domain models but sacrifices the explicit control Jet offers.
ent
Facebook's entity framework for Go with code generation and graph-based schema modeling. Better for complex relational data; steeper learning curve and less SQL-native than Jet.
Build on jet with DEV.co software developers
Jet is production-ready for teams building type-safe microservices and reporting queries in Go. Review the wiki examples, run the code generator against your schema, and assess fit for your database abstraction needs.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
jet FAQ
Does Jet support transactions?
Can I use Jet with an existing Go project?
What happens when my database schema changes?
Does Jet support database-specific features like PostgreSQL JSONB or window functions?
Software developers & web developers for hire
Need help beyond evaluating jet? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.
Evaluate Jet for Your Go Database Layer
Jet is production-ready for teams building type-safe microservices and reporting queries in Go. Review the wiki examples, run the code generator against your schema, and assess fit for your database abstraction needs.