Repository Query Examples

The examples in this section demonstrate how to perform some simple repository queries. In the Repository API, all queries are performed with Query or QueryExpression objects. A QueryExpression is a building block you can use to create simple or complex queries. A Query is a repository query that can be executed. A Query can also be used as a building block to create queries that are more complicated.

The following example assumes an item descriptor named user with an integer property named userType. The query finds users whose userType property is set to 2: