RQL, or Resource Query Language, is a query language used for querying and manipulating resources through the URI. RQL provides the ability to filter, sort, paginate, and project data. More info on the RQL capabilities of the Extra Horizon platform can be found here.
Builder
The Extrahorizon Javascript SDK also export an rqlBuilder to build valid RQL strings.
An example using the rqlBuilder to compose a complex RQL query to request documents having a heartRate between 40 and 50 or where the indicator field has the value warning.
Each value passed to the operators of the rqlBuilder undergoes double encoding to enable the searching of special characters. More information on why values need to be double encoded can be found here.
Disable automatic double encoding
We strongly advise against disabling automatic double encoding.
To deactivate double encoding for all queries generated with the rqlBuilder, you add the following line to the start of your application:
rqlBuilder.doubleEncodeValues = false;
For disabling double encoding on a per-query basis, you can utilize the options parameter in the rqlBuilder constructor like this:
rqlBuilder({ doubleEncode: false })
Parser
You can also use the rqlParser function and pass in your own string.