2.2.1 WQL Query

A client has the capability to express a query against a server. This query MUST be expressed in the WMI Query Language (WQL). WQL is a subset of the American National Standards Institute Structured Query Language, as specified in [FIPS127] and [MSDN-WQL]. WQL differs from the standard SQL in that WQL retrieves from classes rather than tables, and returns CIM classes or CIM instances rather than rows. WQL supports a specific semantic designed to query against CIM classes or CIM instances with their related characteristics. Queries MUST be of one of the following 3 forms:

  • Schema queries: Queries focused on CIM classes.

  • Data queries: Queries focused on CIM instances.

  • Event queries: Queries focused on events triggered by state changes of CIM classes or CIM instances. Events triggered on CIM instances can be internal to the infrastructure (intrinsic) or external to the infrastructure (extrinsic). Events can also be timer events.

WQL uses terminologies and concepts, as specified in [DMTF-DSP0004], except as noted below, and requires familiarity with the CIM model. The server MUST treat a backslash as an escape character in a WQL query, except within a LIKE clause. The server MUST treat literal strings in WQL data as case-insensitive, contrary to what [DMTF-DSP0004] specifies.

The next section specifies the complete syntax of WQL queries for schema, data, and event queries.