# SQLTy vs go-jet

[go-jet](<https://github.com/go-jet/jet>) generates a type-safe SQL builder and models from a live database: `Posts.INSERT(...).VALUES(...)`. SQLTy keeps the SQL as written and checks it, and the structs you scan it into, in `go vet`.

## Quick comparison

|  | go-jet 2.16 | [SQLTy for Go](<https://sqlty.kuncar.dev/recipes/go/index.md>) (preview) |
| --- | --- | --- |
| You write | Go builder calls | SQL |
| Needs a database | Yes, to generate | No |
| Drivers | `database/sql`; pgx v5 on an experimental branch | pgx v5 |
| Databases | PostgreSQL, MySQL, SQLite, CockroachDB, MariaDB | PostgreSQL |
| Wrong destination struct | No error, empty result | `column-name-mismatch` in `go vet` |
| Dynamic queries | First class | Not checked |

## Where SQLTy is stronger

- A wrong destination struct is an error, not an empty result.
- No live database to generate from, and SQL you can read as SQL.

## Where go-jet is stronger

- Dynamic queries built in Go.
- Five databases and `database/sql`.

## Which should you choose?

Choose go-jet if you want to build queries in Go. Choose SQLTy for raw SQL with checked structs.

## What SQLTy is missing

- `database/sql`, MySQL, SQLite.

## Common questions

### Can I check go-jet queries with SQLTy?

No. SQLTy checks SQL strings in `sqlty.SQL[R, P]` constants and pgx calls, not builder expressions.

## Sources

- [go-jet](<https://github.com/go-jet/jet>) 2.16.1 README; still the latest release (2026-12-01); run on PostgreSQL 16 (2026-11-27)
