Overview
workers-qb is a lightweight query builder designed for Cloudflare Workers. It offers a simple, standardized interface while keeping the performance of raw queries — an alternative to a full ORM.
How it differs from ORMs
- Focused on direct SQL access with convenient wrapper methods
- Raw-query performance
- Zero dependencies
- Lightweight and optimized for Workers
Supported databases
- Cloudflare D1
- Cloudflare Durable Objects (SQLite storage)
- PostgreSQL via node-postgres
- Your own database through a custom adapter
The project also ships an AI coding-assistant skill (npx skills install G4brym/workers-qb) for writing SELECT, INSERT, UPDATE and DELETE queries.