Skip to content

Releases: zoopcommerce/shard-module

Hotfix: GenericException

30 Dec 07:43

Choose a tag to compare

Merge pull request #23 from crimsonronin/master

Hotfix: Generic Exception

3.1.0: Query Range

09 Jun 06:40

Choose a tag to compare

This release 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

$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 2014 and Feb 28th 2014 inclusive
  • Date: date={2014-01-01,} all documents greater than or equal to Jan 1st 2014
  • Date: date={,2014-03-01} all documents less than March 1st 2014
  • Int: numComments={10,20} all documents with a numComments between 10 and 19 inclusive
  • Int: numComments={10,} all documents with a numComments greater than or equal to 10
  • Int: numComments={,20} all documents with a numComments less than 20
  • Float: score={90.5,99.99} all documents with a score between 90.5 and 99.98 inclusive
  • Float: score={90.5,} all documents with a score greater than or equal to 90.5
  • Float: score={,99.99} all documents with a score less than 99.99