RQL offers the ability to query items based on their repository IDs. This ability should be used with care, since 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, in which items have been 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 using 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 = ["dept2", "emp345"]

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

ID IN { ["dept2", "emp345"], ["dept2", "emp346"], ["dept2", "emp347"] }
 
loading table of contents...