kysely

Typesafe SQL for TypeScript.

Visit website ↗

Profile updated

Console’s review

· Reviewed by David Mytton

What we like

Prevents mistakes by providing types for SQL queries. Understands fields types, joins, subqueries, aliases, and other advanced SQL features. Also supports dialects from databases like Planetscale, D1, AWS, etc. Enables autocomplete in your IDE. Migrations can also be written in TypeScript.

Tradeoffs

Only works with Postgres, MySQL & SQLite. A third-party project is needed if you want to auto-generate schema definitions.

Is kysely a fit?

Based on Console’s review published on 2023-02-09.

Who it’s for

Developers using TypeScript and specific databases should consider this tool for writing SQL queries

Why consider it

Prevents mistakes by providing types for SQL queries

Keep in mind

It has limited database support

Console is a free weekly newsletter with short reviews of developer tools, covering strengths and tradeoffs. This review reflects Console’s assessment at publication on 2023-02-09. Features and limitations may have changed since the review date. Read our selection criteria and learn about Console.

Key facts

What it is

Type-safe TypeScript SQL query builder.

Source ↗Checked

Company or maintainer

kysely-org contributors.

Source ↗Checked

Source and licensing

Free and open source, MIT.

Source ↗Checked

Tech stack

Runs on
  • Bun
  • Deno
  • Node.js
Integrates with
  • MySQL
  • PGlite
  • PostgreSQL
  • SQL Server
  • SQLite
  • TypeScript

Checked

Source and notes

TypeScript query builder supports Node.js, Bun and Deno, with PostgreSQL, MySQL, SQL Server, SQLite and PGlite dialects.

View research source ↗

Coverage may be incomplete. “Written in” describes implementation, not supported project languages.

Pricing

Free and open source (MIT). No paid cloud plan is listed in the repository.

Pricing source ↗Checked

Also consider

Discover your next favorite tool

Independent devtool reviews and the latest betas, in your inbox every Thursday. Free.