Kysely is a TypeScript SQL query builder that provides strong type safety without the complexity of a full ORM. It catches common database bugs like mistyped column names and incorrect return types at compile time through TypeScript inference. The library offers a thin abstraction over SQL with readable chaining syntax, strongly typed where clauses, intuitive migrations with up/down functions, and automatic type generation from database schemas using kysely-codegen. Unlike ORMs, it stays focused on query building while maintaining SQL-like expressiveness, making it suitable for teams comfortable with SQL who want compile-time safety and lightweight tooling.
Table of contents
Type Safety that Pays Off ImmediatelyA Thin, Readable Layer Over SQLPractical Tooling: Migrations and Type GenerationA quick comparison note5 Comments
Sort: