Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Enum Class ComparisonOperator
- All Implemented Interfaces:
Serializable,Comparable<ComparisonOperator>,Constable
Binary comparison operators used in
ComparisonPredicate.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEquality (=).Strict greater-than (>).Greater-than-or-equal (≥).Strict less-than (<).Less-than-or-equal (≤).Inequality (≠). -
Method Summary
Modifier and TypeMethodDescriptionsymbol()The operator's canonical display symbol, in the Unicode form the language reference uses —=,≠,<,≤,>,≥.static ComparisonOperatorReturns the enum constant of this class with the specified name.static ComparisonOperator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUAL
Equality (=). -
NOT_EQUAL
Inequality (≠). -
LESS
Strict less-than (<). -
LESS_EQUAL
Less-than-or-equal (≤). -
GREATER
Strict greater-than (>). -
GREATER_EQUAL
Greater-than-or-equal (≥).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
symbol
The operator's canonical display symbol, in the Unicode form the language reference uses —=,≠,<,≤,>,≥.This is the single source of truth for rendering an operator to a human: the pretty-printer, the IR report (
:tree), the physical plan printer (:explain), and optimizer trace messages all use it, so one predicate reads the same everywhere. These previously carried separate copies that had drifted —:treeshoweda ≤ 5while:explainshoweda <= 5for the same predicate.Not for wire formats. A backend's spelling is that backend's concern:
SqlExpressionsemits SQL<=andMongoExpressionsemits$lte, and both deliberately keep their own mapping.- Returns:
- the display symbol; never null
-