company logo

View conditions

An ODABA view usually may contain a pre- and a post condition (filter). When defining ODABA views as operation path, however, conditions may be inserted at any position in the operation path. In an operation path, there is no distinction between WHERE and HAVING and one may use the one or the other. Only, in a traditional OQL query, WHERE and HAVING differ in meaning, since the WHERE condition is evaluated in the context of the result of the SELECT operation, while the HAVING condition is checked after the GROUP BY operation.

The argument for a WHERE or HAVING condition is an operand that is valid in the context of the preceding operator (operation path) or of the result of the SELECT or GROUP BY operation (traditional OQL statement). Thus, WHERE and HAVING simply work as setting a filter condition for a collection property.

Related topics