Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
-
None
Description
Reading though the page on the Realm Query Language (https://www.mongodb.com/docs/realm/reference/realm-query-language/), I found a few missing and/or confusing parts:
- Arithmetic is supported in expressions but not mentioned anywhere.
- see tests here for examples: https://github.com/realm/realm-core/blob/master/test/test_parser.cpp#L5194-L5203
- How do you do substitutions?
- (NSPredicate uses %K for keypaths, %@ for variables. Not clear what to do in RQL)
- Subqueries section should be after Collection operators
- Between should be written as between {a, b} in the operator list (otherwise you have to hunt for an example to know how to actually define the range)
In general it is a bit confusing that this information is spread out over multiple pages. If you come from js, you will also hit into https://www.mongodb.com/docs/realm/sdk/node/advanced/query-engine/ and https://www.mongodb.com/docs/realm/sdk/node/examples/read-and-write-data/#std-label-node-filter-queries, both of which contains an incomplete subset of the information on the RQL page. It would be nice if they could be consolidated.