knex
A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use. observed · 2026-10-19
Health v2 · maintenance only
86/100
- Activity 81
- Release rhythm 83
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 3.0
- age_days: 5043
- days_rel: 116
- days_push: 116
- n_releases_24m: 9
Adoption not part of the score
20336 stars · 2225 forks observed · 2026-10-19
What it is AI-extracted, prompt v1, taxonomy v1, 2026-10-19, confidence 0.99
Knex is a flexible, portable SQL query builder for JavaScript that supports multiple database dialects. It provides a promise and callback API, transaction handling, connection pooling, and streaming capabilities for Node.js applications.
Use cases
- build complex SQL queries programmatically in Node.js
- perform database migrations across PostgreSQL, MySQL, SQLite, and other supported engines
- manage transactions and connection pools in a JavaScript backend
- generate SQL dynamically for multi-tenant SaaS platforms
- integrate a query builder into an existing Express or Koa application
When to choose
- you need a lightweight, database‑agnostic query builder rather than a full ORM
- your project runs on Node.js and requires support for many SQL dialects
- you want promise‑based and callback‑based APIs with built‑in transaction and pooling support
When to avoid
- you need a complete ORM with model definitions and relationships
- your application is written in a language other than JavaScript/Node.js
- you require built‑in GraphQL or NoSQL support
Facets
library · maturity active
database-driver databases web-development sql multi-dialect promise-api callback-api transaction-support connection-pooling streaming-queries data-engineering nodejs javascript
4 sources
- readme: https://github.com/knex/knex · fetched 2026-10-19 · 3e4037c258b2
- homepage: https://knexjs.org/ · fetched 2026-10-05 · f77fba2b7873
- site_page: https://knexjs.org/faq · fetched 2026-10-05 · a2c3b5bea791
- site_page: https://knexjs.org/changelog.html · fetched 2026-10-05 · ff40bbdac081
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| knex/knex | main | 86 |
| knex/documentation | docs | 32 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem