DealerOn.DQL

A .net standard package for parsing DealerOn Query Language to an AST

About DQL

DealerOn allows for customization of inventory search pages, specials, widgets, and more with a simple domain specific language ("DealerOn Query Language", or DQL) which is structurally similar to a WHERE clause in SQL.

Some examples of queries are:

  • make = 'chevrolet'
  • make = 'ford' and model like 'f-%'
  • year between 2018-2020
  • bodystyle contains 'truck'

For more info on what DQL is and isn't, see the intro article.

About this library

The core library (DealerOn.DQL) provides a .net standard compatible parser which defines and understands DQL syntax "natively". It uses Superpower to tokenize the query, and parse it to an abstract syntax tree. The core library just ensures that the query is syntactically valid and provides the AST without making any assumptions about what a consumer will to with that AST. The core library can also return an error message for an un-parsable query.

Two other libraries are included in this solution for translating the parsed DQL syntax tree into an Elasticsearch query or a compiled LINQ expression tree. This essentially allows for the base DQL syntax to be run in-memory or executed against an elasticsearch index. Additional targets may be added in the future such as SQL or WebAssembly.

For information on installation and usage, see here

  • Improve this Doc
In This Article
Back to top Generated by DocFX