Powerful filtering language

Search a collection using a powerful filtering language. The most common filtering is against scalar properties on the target type. Filtering can use most scalar properties. However, some properties are virtual and filtering can't use them. In such cases, if attempted, the API returns an error informing the user that the property can't be used.

Scalar properties can be compared for equality (== or =eq=) and inequality (!= or =ne=). For example, consider an object with a numeric property called maxRetries. A filter of maxRetries==3 may return all of the objects where maxRetries is set to 3. Likewise, a filter of maxRetries!=3 may find all objects where maxRetries is a value other than 3.

Numeric properties may also use greater than (> or =gt=), greater than or equal (>= or =ge=), less than (< or =lt=), and less than or equal (<= or =le=) operators.

String properties may use the wildcard character (*) to perform wildcard matching. For example, many objects have a name property. Suppose a collection is filtered with name==test*. If there are objects named test1 and test2, these objects would match the search criteria and be returned.

To help represent special values, the filtering functionality offers a couple of helper functions. The null() function can be used to match null values. For example, if an object has an optional property description, a filter of description==null() can be used to find all objects in the collection with a missing description. Likewise, an empty() function can be used to find empty string values.

Basic searches can be combined to make a complex search using logical AND (;) and OR (,) conditions. For example, to search for the objects in a collection where the name is test, or the string test is in the description, the filter name=test,description=*test* can be used.