Object Query Language Reference
The Object Query Language (in short: OQL) is the language used by iTop for defining queries that retrieve persisted objects.
OQL queries are used in many places in iTop (audit rules, notifications, etc.) to define or configure sets of objects.
The goal of the OQL language is to hide the complexity of the actual SQL schema of the data model while leveraging its definition for providing a secure (access rights are enforced by the queries), powerful (complex conditions can be expressed in OQL), efficient (one OQL query is translated into exactly one SQL query), object-aware (class inheritance is respected) and simple syntax.
The OQL syntax is similar to the syntax of SQL, the OQL grammar is basically a subset of the SQL grammar.
As of now, only SELECT statements have been implemented.
Such statements do return two kinds of data set:
Either a list of objects of the selected class.
Or a list of objects and related objects (several classes of objects per row)