PrevUpHomeNext

Relational Operations

Quince defines overloads of the infix binary operators ==, !=, <, >, <= and >=. All of these overloads build and return predicates (i.e. exprn_mapper<bool>s) that represent server-side comparisons.

These overloads apply when there is a mapped type T, such that:

The resulting predicate, when executed, evaluates the subexpressions represented by the operands, and then compares the results.

In cases where the subexpressions evaluate to single columns, the comparison is done simply by using an SQL relational operator (=, !=, < >, <= or >=).

In cases where the subexpressions evaluate to multiple columns, because T is a user-defined class, or a std::tuple, then comparison is lexicographic. Details are here and here.

Quince also overloads ==, !=, <, >, <= and >= for another purpose.


PrevUpHomeNext