mongodb-language-model

Crates.iomongodb-language-model
lib.rsmongodb-language-model
version0.1.6
sourcesrc
created_at2022-07-11 23:03:10.682147
updated_at2022-07-18 17:28:51.208283
descriptionParses MongoDB query language and returns an abstract syntax tree
homepage
repositoryhttps://github.com/fcoury/mongodb-language-model-rust
max_upload_size
id624030
size68,456
Felipe Coury (fcoury)

documentation

README

mongodb-language-model

CI workflow

Parses a MongoDB query and creates an abstract syntax tree (AST) with part of speech tagging. Currently, only strict extended json syntax is supported and not all the cases are being created correctly and some may not be missing altogether.

This library is based on previous Node.js work by Thomas Rueckstiess on the mongodb-language-model repository. It has been ported from Node.js and PEGjs to Rust and pest.rs.

Usage

The module exposes a function parse(query: &str) -> Result<Expression, Error<Rule>> that takes a mongo JSON query string and returns the parsed AST structure.

Commit count: 25

cargo fmt