azavea/OTM2 — pull request #45 by ahinz (2013-07-12 17:48:34+00:00)
Title: Add in filter parser

Adds code to parse filters according to the following syntax:

literal = json literal | GMT date string in 'YYYY-MM-DD HH:MM:SS'
model = 'plot' | 'tree'
value-property = 'MIN' | 'MAX' | 'EXCLUSIVE' | 'IN' | 'IS'
combinator = 'AND' | 'OR'
predicate = { model.field: literal }
| { model.field: { (value-property: literal)* }}
filter = predicate
| [combinator, filter*]

In particular, this commit provides code (and tests) for transforming
filter strings into query objects.

This commit does not actually provide any specific filters (or tests) by
itself. Those should be added and tested as needed.