Doradus Query Language (DQL) : Quantifier Functions : Quantifiers with IS NULL

Quantifiers with IS NULL
Special semantics are applied when a link path is used with the IS NULL clause. When quantified with ANY, a link path is null if the resulting value set is empty. In the following example, each link is implicitly qualified with ANY:
InternalRecipients.Person.LastName IS NULL
This clause is true for a perspective object if:
InternalRecipients is null, or
Person is null for every InternalRecipients object, or
LastName is null for ever Person object.
In other words, if at least one InternalRecipients.Person.LastName exists, IS NULL is false. Since ANY is associative, any portion of the link path can be explicitly quantified and the result is the same.
If a link path used with IS NULL is quantified with ALL, the clause is true only if (1) the quantified portion of the path is not empty but (2) the remainder of the path produces an empty set. For example:
ALL(InternalRecipients).Person.LastName IS NULL
This clause is true if InternalRecipients is not null but Person.LastName is null for every InternalRecipients value. Either Person can be null or a Person’s LastName can be null to satisfy the second condition. Alternatively, consider this ALL quantification:
ALL(InternalRecipients.Person).LastName IS NULL
In this case, InternalRecipients cannot be null, at least one InternalRecipients must have a Person, but no Person objects have a LastName. Essentially, ALL adds an existential requirement to the quantified portion of the link path.
If the quantifier NONE is used, the quantified portion of the link path can be empty. For example:
NONE(InternalRecipients).Person.LastName IS NULL
This clause is true for an object if either InternalRecipients is null or if LastName is not null for every InternalRecipients.Person.
When a quantified IS NULL clause is negated, it selects the opposite objects than without negation. This means that all objects selected by the following clause:
Q(X).Y IS NULL
are selected by the clause:
NOT Q(X).Y IS NULL
where Q is a quantifier and X and Y are field paths.