The best sql query builders, according to hackers
8 sql query builders recommended in Hacker News comments over the past year, ranked by how many separate people recommend each one.
All sql query builders
- sqlcGenerates type-safe code from plain SQL queries, giving ORM-style convenience without ORM overhead. Critics say support for other languages lags behind Go and Postgres.20recommend
- Ecto (Elixir)Elixir database library that follows SQL closely, makes queries explicit and avoids hidden magic. Main caveat: defining large schemas is repetitive compared with Django.17recommend
- sqlxRust crate that checks SQL against your database at compile time, catching type errors early. Common caveat: dynamic queries are hard.13recommend
- jOOQPraised for type-safe SQL in Java without ORM magic; some critics call it weaker than alternatives.13recommend
- KyselyPeople recommend Kysely for type-safe query building with rich TypeScript support while keeping close to raw SQL. One critic says complicated queries fall apart.12recommend
- JdbiPeople recommend Jdbi as a Java database library that handles connection plumbing while leaving the SQL visible, with no ORM layer in between.6recommend
- TailwindSQLPraised as a clever, playful take on Tailwind's approach applied to SQL in React. Critics call it a joke or proof of concept, not for production use.5recommend
- pg-typesafeRecommended for typed PostgreSQL queries in TypeScript that catch misspelled column names, an improvement on pgtyped. Critics say dynamic queries and composability are hard.5recommend