Skip to content

adrianmarino/aql-mongo-transpiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aql-mongo-transpiler

A simple transpiler that gets a simple kibana like query language and compile it to MongoDB query language.

// A simple query language...
var query = "(user.id=1 || user.age=20) and (user.name='adrian' or user.birth from ´1981-09-22 21:15:00´ to ´2020-01-01´)";

log.info(new AQLToMongoTranspiler().transpile(query));

Output:

$and:[$and:[$or:[{'user.id': 1}, {'user.age': 20}]], $and:[$or:[{'user.name': 'adrian'}, {'user.birth': {$from:'1981-09-22 21:15:00', $to:'2020-01-01'}}]]]

Diagram

About

A transpiler from a kibana like query to mongodb

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published