Atomic predicates

An atomic predicate is a relationship between two attributes.

You can define an atomic predicate by using the following syntax:
attribute_1 binary_relational_operator attribute_2

The right attribute attribute_2 in an atomic predicate can be a compound or a leading object attribute. The left attribute attribute_1 can also be a compound attribute or a leading object attribute.

The query language defines five binary relational operators:
=
>
>=
<
<=
The query language also defines four special unary relational operators:
is null
is not null
exists
not exists
By using unary relational operators, the query language can define an atomic predicate in the following special formats:
attribute is null
attribute is not null
exists attribute
not exists attribute

Where, attribute must be object attribute.

Subquery

The subquery is supported in an atomic predicate, in the following formats:
attribute_1 IN ( query_2 )
attribute_1 IN sql( 'sql_query_2' )
Where, query_2 is a regular WQL query and sql_query_2 is a SQL query string.
attribute_1 op query_2
attribute_1 op sql_query_2
Where, op can be one of the binary relational operators. The query_2 must not return a set of data if the operator is not 'IN'. The same applies to sql_query_2.