Filtering Collections

Meta Data Services Programming

Meta Data Services Programming

Filtering Collections

You can filter collections to determine which items to include in a collection based on criteria you provide. Filters can be used to define queries, or to work with a subset of all available items that match criteria you define.

Filters that you create can be applied to target object collections, relationship collections, object instance collections, workspaces, and to the repository as a whole. You can also create filters on derived collections.

To create a filter, use the IReposQuery interface. IReposQuery is implemented by the Repository class, the Workspace class, and the RelationshipCol class.

To create your criteria, you must create a filter in the form of a SQL WHERE clause. You can then attach this filter as a parameter to the IReposQuery::GetCollection method.

Filtering only occurs at run time. Filter definitions are not stored in a repository database.

See Also

Filtering Derived Collections

IReposQuery::GetCollection

Navigating a Repository

RelationshipCol Class

Repository Class

Workspace Class