
Knex.js
A flexible SQL query builder for Node.js supporting MySQL, PostgreSQL, SQL Server, SQLite3, and more, with a schema builder, migrations, and both callback- and Promise-based APIs.
Knex.js is a “batteries included” SQL query builder for Node.js, offering a chainable API for building SELECT, INSERT, UPDATE, and DELETE queries, a schema builder for creating and altering tables, and a migration and seed system for versioning a database’s structure and seed data. It connects to MySQL through the mysql or mysql2 driver, and ships dedicated query compilers for PostgreSQL, SQL Server, SQLite3, Redshift, CockroachDB, and Oracle alongside its MySQL support.
Originally created by Tim Griesser in 2013, it’s released under the MIT license, has around 20k stars on GitHub, and underpins higher-level tools such as the Objection.js ORM.
Community feedback
This space is for grounded, evaluable experience — versions used, environments, what you measured or observed, and how it behaves alongside other software. General impressions without supporting detail may be removed. Sign in to write one; posts are tied to a verified identity, not anonymous.