pivotql-compiler-mongodb
v0.4.2
Published
Compile PivotQL ASTs to mongodb queries.
Downloads
3
Readme
PivotQL compiler for mongodb
Produces mongodb queries from PivoQL ASTs.
Install
npm install pivotql-compiler-mongodb
Example
import {parse} from 'pivotql-parser-expression';
import {compile} from 'pivotql-compiler-mongodb';
const query = '( height <= 20 or favorites.color == "green" ) and firstname in ["john", "doug"]';
const queryMongo = compile(parse(query))
// Use queryMongo with query API.
More information
See main repository for more information.