[This is preliminary documentation and subject to change.]
WQL supports the programmatic traversal of associations with a SELECT statement that uses an association class as the target class and with the following two query extension statements:
An association describes a relationship between two classes or instances of classes. Each association is described by an association class, which is tagged with the Association standard qualifier and has as two of its properties references to the related classes or instances.
The ASSOCIATORS OF statement retrieves all instances that are associated with a particular instance, referred to as the source. The instances that are retrieved are referred to as the endpoints. For example, consider a source that is an instance of the class Adapter. The Adapter class is associated with the Protocol class and with the Driver class. Issuing the following ASSOCIATORS OF statement retrieves all of the Protocol and Driver instances associated with that Adapter instance:
associators of {Adapter="AHA-294X"}
The following diagram illustrates this example. The source is an instance of the Adapter class. There are three association instances, two that reference a Protocol instance and one that references a Driver instance. The endpoints are the Driver and Protocol instances:
The REFERENCES OF statement is similar to the ASSOCIATORS OF statement in its syntax, but rather than retrieving endpoint instances it retrieves association instances.