ID-based Queries

RQL can query items based on their repository IDs. This ability should be used with care, because repository IDs are not portable across repository implementations.

The first query searches for items that match a set of IDs. For example:

ID IN { "0002421", "0002219", "0003244" }

The next ID-based query applies only to content repositories, where items are organized into folders. This query restricts the search to only those items in the specified folders. The folders must be specified by ID:

IN FOLDERS { "10224", "10923", "12332" }

Note that passing in an empty or null set of IDs results in an exception.

Composite IDs can be specified in RQL queries with the following format for integers:

[value1, value2 ... valueN]

String IDs use the format:

["value1", "value2" ... "valueN"]

So a simple comparison query of a composite ID property might look like:

ID IN ["dept2", "emp345"]

Such a query returns an item with a composite repository ID of dept2:emp345. A query like this returns items with any of the IDs dept2:emp345, dept2:emp346, or dept2:emp347: