Analysis updated 2026-07-03
Write database queries in Go where the compiler catches column name typos and type mismatches before the app runs.
Generate Go types from a PostgreSQL or MySQL schema so your editor autocompletes table and column names.
Run complex SQL with window functions, subqueries, and CTEs using Go code instead of raw SQL strings.
Map SQL query results directly into nested Go structs without writing manual scan code.
| go-jet/jet | hoanhan101/algo | microcosm-cc/bluemonday | |
|---|---|---|---|
| Stars | 3,669 | 3,669 | 3,669 |
| Language | Go | Go | Go |
| Setup difficulty | moderate | easy | easy |
| Complexity | 3/5 | 1/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires running the code generator against a live database before writing your first query.
Jet is a Go library for interacting with SQL databases. It solves a specific frustration that comes up when writing database queries in Go: most approaches require either writing raw SQL strings (which the compiler cannot check for mistakes) or using an ORM that hides SQL behind a different abstraction. Jet takes a middle path. You write queries that look like SQL, but they are written as Go code, so the compiler catches typos and type mismatches before your program ever runs. The workflow has two steps. First, you run a code generator that connects to your database and reads its structure: the tables, columns, views, and enums. It writes Go files representing those structures. Second, you use those generated types to build queries in Go code. Because the generated types match your actual database schema, your editor can autocomplete column names, and the compiler will flag any query that references a column or table that does not exist. Supported databases are PostgreSQL, MySQL, and SQLite, along with compatible databases that use the same protocols, such as CockroachDB and MariaDB. The library handles all the standard SQL operations: SELECT, INSERT, UPDATE, DELETE, WITH clauses, window functions, subqueries, and locking statements. When you execute a query, Jet maps the results directly into Go structs that you define, including nested structs for joined data. The README explicitly notes that Jet is not an ORM. It does not manage relationships, migrations, or model lifecycle. It is specifically a query builder and result mapper, meaning you still write logic that resembles SQL rather than calling object methods like save() or find(). Installation requires Go 1.24 or later. You add Jet as a dependency with a single go get command and install the generator separately with go install. The README includes a full walkthrough using a sample DVD rental database to demonstrate how generation, query writing, and result mapping work together. The full README is longer than what was shown.
Jet is a Go library for writing SQL queries as type-safe Go code. A code generator reads your database schema so the compiler catches column name typos and type mismatches before your app runs.
Mainly Go. The stack also includes Go, PostgreSQL, MySQL.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.