Focused query-builder extensions and SQL helpers for Drizzle ORM.
drizzle-plus adds practical query methods such as count(), upsert(),
updateMany(), and cursor pagination. It also provides typed SQL expressions
for common functions, JSON aggregation, timestamps, subqueries, and more.
It supports PostgreSQL, MySQL, and SQLite. The documentation has one page for each extension and helper family, with the supported import path and a working starting example.
pnpm add drizzle-plus drizzle-ormThe package targets the Drizzle ORM v1 line and declares drizzle-orm as a
peer dependency. Keep both packages on compatible versions.
Query extensions are enabled with a dialect-specific side-effect import:
import 'drizzle-plus/sqlite/findManyAndCount'
const page = await db.query.user.findManyAndCount({
where: { active: true },
columns: { id: true, name: true },
limit: 20,
})
page.data
page.countUse pg, mysql, or sqlite in the import path that matches your Drizzle
database. Shared SQL helpers are named imports:
import { caseWhen, upper } from 'drizzle-plus'
import { jsonAgg } from 'drizzle-plus/pg'- Getting started — install the package and enable an extension.
- Full documentation — task-oriented guides for every feature.
pnpm test
pnpm run lint
pnpm run docs:buildContributions are welcome. See the full documentation for feature boundaries and dialect support.
The agent reference is a complete, non-tutorial inventory of the package's query extensions, select helpers, SQL functions, utilities, types, and dialect boundaries. Use it to find the relevant guide before choosing an API.
MIT