View Source QueryParser.Parser.Grammar (query_parser v1.0.0-beta.27)

This module define the mongo grammar

This grammar will transform the query string into a AST tree.

This is a 1 to 1 transformation of the mongo_language_model : https://github.com/mongodb-js/mongodb-language-model/blob/master/grammar.pegjs

Some features are missing and could be added later.

Summary

Functions

Parse the input using the defined grammar.

Parse the input using the defined grammar, raising Neotomex.Error on failure.

Functions

@spec parse(binary()) :: {:ok, any()} | :mismatch | {:error, term()}

Parse the input using the defined grammar.

@spec parse!(binary()) :: any()

Parse the input using the defined grammar, raising Neotomex.Error on failure.