An open API service indexing awesome lists of open source software.

https://github.com/chriniko13/adt-example-for-query-parsing


https://github.com/chriniko13/adt-example-for-query-parsing

adt log4j scala scalatest spray

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

### ADT Example for Query Parsing
#

#### Description

Just a sample Algebraic Data Type in order to parse a query in a format that front end application
sends to back end.

```text
TreeFormatRule =
TreeFormatNestedRule(id * frequency * combinator * [TreeFormatRule] * not)
+
TreeFormatFlatRule(id * field * operator * value)



TreeFormatFlatRuleValue =
TreeFormatFlatRuleSingleValue(value)
+
TreeFormatFlatRuleMultiValue([value])

```

The query tool used in front end is the following: https://github.com/sapientglobalmarkets/react-querybuilder

#### Unit Tests
In order to run them, execute: `sbt test`