Packages
@melon-db/db-query-mango
Mango-style JSON queries compiled to QueryAst.
Status: Shipped (documented subset) · Depends on: @melon-db/db · API: Reference
Serializable CouchDB/RxDB-style selectors for configs, tests, and devtools.
Install (alpha)
npm install @melon-db/db-query-mango@alphaOr with Bun:
bun add @melon-db/db-query-mango@alphaExample
import { createMangoCompiler } from '@melon-db/db-query-mango';
const compiler = createMangoCompiler();
const prepared = compiler.compile(
{
selector: { status: 'open', priority: { $gte: 2 } },
sort: [{ updatedAt: 'desc' }],
limit: 20,
},
schema,
);
const rows = await db.collection('tasks').query(prepared).fetch();Unsupported Mango operators fail at compile time with actionable errors.
Author & license
Copyright (c) 2026 Nate Nichols. MIT License.
