Last active
June 30, 2017 01:24
-
-
Save resistdesign/da4bbee3f4e92d715e4ddfa14c9fd18b to your computer and use it in GitHub Desktop.
Universal Query Structure (UQS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Query | |
| { | |
| type: 'OR_SET', | |
| data: [ | |
| { | |
| type: 'AND_SET', | |
| data: [ | |
| { | |
| type: 'CONDITION', | |
| fieldName: 'myField', | |
| operator: 'EQUALS', | |
| value: 'Some Value' | |
| }, | |
| { | |
| type: 'OR_SET', | |
| data: [ | |
| { | |
| type: 'CONDITION', | |
| fieldName: 'myField', | |
| operator: 'EQUALS', | |
| value: 'Some Value' | |
| }, | |
| { | |
| type: 'AND_SET', | |
| data: [ | |
| { | |
| type: 'CONDITION', | |
| fieldName: 'myRelatedField', | |
| operator: 'EQUALS', | |
| value: { // A query for a nested collection OR embeded object. | |
| type: 'OR_SET', | |
| data: [] | |
| } | |
| }, | |
| { | |
| type: 'CONDITION', | |
| fieldName: 'myField', | |
| operator: 'EQUALS', | |
| value: 'Some Value' | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment