Comparisons
Each page compares SQLTy with one tool: a quick comparison table, where each is stronger,
which to choose, what SQLTy is missing, and the versions tested. Every page is checked again
for each SQLTy release.
Typed SQL
Tool
Language
How it types SQL
sqlc
Go, Python and others
Generates code from schema and .sql files
SQLx
Rust
Query macros checked against a database at compile time
asyncpg_typed
Python
Declared types checked against the server on every call
aiosql and PugSQL
Python
Named queries from .sql files, untyped
ioj/sqlty
Go
Generates pgx code; unrelated to SQLTy despite the name
pggen
Go
Generates pgx code from .sql files and a live database
scany and sqlx
Go
Scan rows into structs at runtime
Other languages
Java, Kotlin, Scala, Haskell, Rust, Gleam
jOOQ, SQLDelight, doobie, postgresql-typed, Cornucopia, Squirrel
ORMs and query builders
Tool
How SQLTy fits
SQLAlchemy
Checks the raw SQL you run through text()
Django ORM
Checks the raw SQL you run through connection.cursor()
bob
Go: checks raw SQL constants instead of a generated ORM
go-jet
Go: checks raw SQL constants instead of a query builder
SQL linters and libraries
Tool
What it checks
sqruff
Style and formatting of .sql files; SQLTy runs its rules on Python strings
SQLFluff
Style of .sql files and dbt models
sqlglot
A parser and transpiler that annotates SQL types
Inline SQL
SQL highlighting and basic checks in VS Code
sqlvet
Names and syntax of raw SQL in Go calls
Migration linters
Tool
What it checks
Squawk
PostgreSQL migration files, one at a time
MigrationPilot
PostgreSQL migration files, with explanations of each lock
pgdeadbolt
PostgreSQL migration files, with suggested rewrites