zoopcommerce/shard-module — pull request #16 by crimsonronin (2014-05-18 06:17:12+00:00)
Title: Enhancement: Range Filter for Get List

This allows a "range" filter for getList.

The syntax uses the math range notation eg. `{10,20}` which would retrieve all documents between 10 (inclusive) and 20. We use the `->range()` doctrine function eg http://doctrine-mongodb-odm.readthedocs.org/en/latest/reference/query-builder-api.html

```php
$qb = $dm->createQueryBuilder('Account')
->field('amount_due')->range(10, 20);
```

It can perform range queries on a number of types eg.

* Date: `date={2014-01-01,2014-03-01}` all documents between `Jan 1st` and `Feb 28th` inclusive
* Int: `numComments={10,20}` all documents with a `numComments` between `10` and `19` inclusive
* Float: `score={90.5,99.99}` all documents with a `score` between `90.5` and `99.99` inclusive

@superdweebie I'm keen to get your thoughts on the syntax and logic. I could put tighter validation on the syntax eg. ensure that there is a high and low variable. Alternatively, we could do `{,100}` for less than 100 or `{100,}` for greater than or equal to 100?

Also, regarding the complexity issues, should I split out some of the criteria functions into their own thing?