This documentation supports the 9.1 to 9.1 Service Pack 3 version and its patches of BMC Atrium Core. The documentation for version 9.1.04 and its patches is available here.

To view the latest version, select the version from the Product version menu.

CMDBQueryObject structure

The CMDBQueryObject structure holds the qualification for the query, such as whether to retrieve a CI or a relationship class and how many levels to walk in the graph.


typedef struct CMDBQueryObject
{
   CMDBClassNameId classNameId;
   ARNameType alias;
   ARNameType sourceNodeAlias;
   CMDBQueryQualifierStruct *qualification;
   CMDB_QUERY_OBJECT_TYPE queryObjectType;
   CMDB_QUERY_JOIN_TYPE joinType;
   CMDBQueryQualifierStruct *joinQualification;
   union
   {
      CMDBQueryObjectRelationship relationshipInfo
   } u;
} CMDBQueryObject;



The CMDBQueryObject structure consists of the following elements:

classNameId

The class name and namespace of the instance to query.

alias

The alias name for the class that is specified in the CMDBQueryObject structure. The alias must be unique across all CMDBQueryObject objects.

sourceNodeAlias

The alias name of the source CI class for which the related endpoints are requested in the query. Specify this parameter when requesting multiple relationships for a given CI class. This member is not required for querying linear relationships in the format C->R->C.

If the value in this member is NULL, the previous node in the query graph is the source node by default.

qualification

The CMDBQueryQualifierStruct structure that holds the qualification for the query.

queryObjectType

An integer value that specifies whether the query object to retrieve is a CI (regular) or a relationship class.

  • 1 --The class type is regular (CMDB_CLASS_TYPE_REGULAR ).
  • 2 --The class type is relationship (CMDB_CLASS_TYPE_RELATIONSHIP ).

joinType

The type of join to execute in the query for any two consecutive query objects in the query object list. You can create an explicit join to relate any two CIs, even if they do not have a relationship class connecting them.

  • -1 --No explicit Join type to perform in the query
    (CMDB_QUERY_JOIN_TYPE_NONE = -1 ). If no explicit Join type is specified, an INNER join is performed in the query, using the relationship attributes in the qualification.
  • 0 --The Join type to perform in the query is Inner join.
    (CMDB_QUERY_JOIN_TYPE_INNER = 0 ).
  • 1 --The Join type to perform in the query is Left Outer join.
    (CMDB_QUERY_JOIN_TYPE_LEFT = 1 ).
  • 2 --The Join type to perform in the query is Right Outer join.
    (CMDB_QUERY_JOIN_TYPE_RIGHT = 2 ).

joinQualification

The explicit join condition to execute in the query in conjunction with the joinType.

For example, to determine the impact relationships for the C1 class in the query C1->R1->C2, the joinType of R1 is specified as Inner and the join qualification is specified as C1.instanceid= R1.impactdestinationid. The joinType of C2 is Inner and the join qualification is C2.instanceid = R2.impactsourceid.

relationshipInfo

A CMDBQueryObjectRelationship object that defines the direction to walk in the graph and the minimum and maximum number of relationships to return for the specified CI class.

Was this page helpful? Yes No Submitting... Thank you

Comments