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.

CMDBQueryStruct structure

The CMDBQueryStruct structure holds a list of query objects with qualification for the instances to retrieve. This is a top-level structure, which is used in the CMDBQueryByPath function.

typedef struct CMDBQueryStruct
   ARNameType datasetId;
   unsigned int datasetMask;
   CMDBQueryObjectList *queryObjects;
   CMDBQueryObjectOptionalList *queryObjectsOptional;
   CMDBQueryObjectSelectorList *queryObjectsToSelect;
   unsigned int firstRetrieve;
   unsigned int maxRetrieve;
   CMDBQuerySortList querySortList;
   ARBoolean numMatches;
} CMDBQueryStruct;

The CMDBQueryStruct structure consists of the following elements:


The ID of the dataset from which to retrieve the instances.


An integer value that specifies the dataset type for the query.

  • 0 -- Based on the datasetId passed, instances are retrieved from either the overlay or the original dataset (CMDB_GET_MASK_NONE ).
  • 1 << 0 --Allows you to retreive instances from the current dataset only .(CMDB_GET_DATASET_MODE_CURRENT ).


A pointer to CMDBQueryObjectList, which contains a list of CMDBQueryObject structures that specify the qualifications for the instance to retrieve.


A pointer to the CMDBQueryObjectList structure, which specifies the optional qualifications for the query. For example, when querying for all computer systems in an organization, you might also want to retrieve the printers to which these computer systems are connected. A computer system might not be connected to a printer, in which case returning a printer becomes optional.


A pointer to CMDBQueryObjectSelectorList, which contain the class name and attributes to select from each instance in the result that met the required condition.


The first object to retrieve from the list of objects returned.


The maximum number of objects to retrieve from the list of objects returned.


An integer value that specifies the properties for returning the query results.

  • 0 --The query results are returned in a list or linear format (CMDB_QUERY_RESULT_STRUCT_FORMAT_LIST ).
  • 1 --The query results are divided in two parts: a list of CIs nodes and a list of relationship edges, which helps in constructing a CI and relationship graph (CMDB_QUERY_RESULT_STRUCT_FORMAT_CMDB_GRAPH ).
  • 2 --The query results are returned in a graph format if the number of rows that matches the criteria is within the chunk size. The results are returned in a list format if the number of rows that matches is greater than the chunk size (CMDB_QUERY_RESULT_STRUCT_FORMAT_CHUNK_BASED ).


The list of attributes and the sort orders, based on which the query results are returned.


A Boolean value indicating whether to return the total number of CI and relationship instances that the call matched in the query.

  • TRUE --Return the number of instances that match the query.
  • FALSE --No matched instances to return.

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