← All projects

Knex.js

Batteries-included SQL query builder for JavaScript

Dev Toolssqlquery-builderjavascriptnodejsdatabasetypescriptopen-source
Knex.js screenshot

About

Knex.js is an open-source SQL query builder for JavaScript and Node.js that supports multiple databases including PostgreSQL, MySQL, SQLite3, MSSQL, and Amazon Redshift. It provides a unified API with promise and callback interfaces, schema building, transaction support, and connection pooling. TypeScript bindings are included, and it can also be used in the browser for learning purposes.

Problem

Writing raw SQL queries across multiple database dialects is error-prone and lacks portability in JavaScript applications.

For

JavaScript and Node.js developers building database-driven applications

How it works

Developers install Knex via npm and use its fluent JavaScript API to compose SQL queries that are translated into the appropriate dialect for the configured database client.

Business model

open-source

Status

launched

Similar projects