Kysely (pronounce “Key-Seh-Lee”) is a type-safe and autocompletion-friendly typescript SQL query builder. Inspired by knex. Mainly developed for node.js but also runs on deno and in the browser. Kysely makes sure you only refer to tables and columns that are visible to the part of the query you're writing. The result type only has the selected columns with correct types and aliases. As an added bonus you get autocompletion for all that stuff. As shown in the gif above, through the pure magic of modern typescript, Kysely is even able to parse the alias given to pet.name and add the pet_name column to the result row type. Kysely is able to infer column names, aliases and types from selected subqueries, joined subqueries, with statements and pretty much anything you can think of. Of course there are cases where things cannot be typed at compile time, and Kysely offers escape hatches for these situations.

Features

  • Kysely currently works on PostgreSQL, MySQL and SQLite
  • All you need to do is define an interface for each table in the database and pass those interfaces to the Kysely constructor
  • Generate the table types automatically from the database schema
  • You can find examples of select queries in the documentation
  • Stream select query results
  • Migrations supported

Project Samples

Project Activity

See All Activity >

Categories

Database, Build Tools

License

MIT License

Follow Kysely

Kysely Web Site

You Might Also Like
Gradelink Student Information System Icon
Gradelink Student Information System

Elementary, Middle and High Schools, K-8, K-12, Private, Charter, College Departments and Trade/Technical Schools

Help your school save time, increase enrollment, and achieve its mission with Gradelink. An award-winning student information system and school management system, Gradelink school management software system is suitable for Preschool through High school. Gradelink is a great fit for higher education and for small colleges. Gradelink combines school management, teaching, and learning tools to help schools perform their best. Top features include attendance management, report cards, classes and scheduling, standards-grading system, communications, student information, and student/parent access. Lesson plans, grade sheets, parent communication and custom reports all work together in perfect unison. Gradelink is ideal for K8 schools, private schools and Charter schools.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Kysely!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Database Software, TypeScript Build Tools

Registered

2022-07-26