# SQLTy vs ioj/sqlty

These are two unrelated projects with the same name. [ioj/sqlty](<https://github.com/ioj/sqlty>) is a Go code generator: it reads PgTyped-style `/* @name GetUser @one */` queries from `.sql` files, prepares them on a live PostgreSQL and generates pgx v5 code. SQLTy ([jirikuncar/sqlty](<https://github.com/jirikuncar/sqlty>), `pip install sqlty`) is a static type checker for SQL in Python, and in Go as a [`go vet` analyzer](<https://sqlty.kuncar.dev/recipes/go/index.md>) (preview). It reads your schema files and never connects to a database.

## Quick comparison

|  | ioj/sqlty (b0be6ba) | SQLTy 0.10 |
| --- | --- | --- |
| Language | Go | Python; Go in preview |
| Approach | Generates Go functions from `.sql` files | Checks inline SQL and `.sql` query files against your types |
| Needs a database | Yes: `dbUrl`, `PREPARE` | No |
| Nullability | From the source column only: a LEFT JOIN column came out as `string`, and the run failed with "cannot scan NULL" | Inferred through joins and expressions |
| Lint rules | None | Over 70 |
| Extras | Watch mode, cursors, bulk inserts, `:ids...` lists | Breaking-change and migration checks, language server |

## Where SQLTy is stronger

- No database, correct nullability on outer joins, and lint rules.

## Where ioj/sqlty is stronger

- Generated pgx code with cursors, bulk inserts and list spreading, and a watch mode.

## Which should you choose?

Pick by approach. For generated Go functions from `.sql` files, ioj/sqlty. For your own structs and SQL constants checked in `go vet` with no database, or for Python, SQLTy.

## Common questions

### Is ioj/sqlty related to SQLTy?

No. They share a name only. SQLTy is [jirikuncar/sqlty](<https://github.com/jirikuncar/sqlty>) on GitHub and `sqlty` on PyPI.

## Sources

- [ioj/sqlty](<https://github.com/ioj/sqlty>) README and generator at b0be6ba; run on PostgreSQL 17 (2026-12-01)
