- All Known Implementing Classes:
ArrayConstruction,AttributeOperand,BinaryArithmeticExpression,BooleanOperand,CollateOperand,ConditionOperand,DateOperand,DurationOperand,FunctionCall,NullOperand,NumberOperand,ParameterOperand,ScalarSubqueryOperand,SetLiteralOperand,StringOperand,StructConstruction,TimeOperand,TimestampOperand,UnaryOperand
public sealed interface Operand
permits AttributeOperand, StringOperand, NumberOperand, BooleanOperand, NullOperand, DateOperand, TimeOperand, TimestampOperand, DurationOperand, BinaryArithmeticExpression, FunctionCall, SetLiteralOperand, UnaryOperand, StructConstruction, ArrayConstruction, ConditionOperand, CollateOperand, ParameterOperand, ScalarSubqueryOperand
Root sealed interface for scalar value expressions used in projections and
predicates.
Operands include column references (AttributeOperand), literals
(NumberOperand, StringOperand, BooleanOperand, and the
typed temporal literals DateOperand, TimeOperand,
TimestampOperand, DurationOperand), arithmetic expressions
(BinaryArithmeticExpression, UnaryOperand), function
invocations (FunctionCall), and set literals
(SetLiteralOperand).
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<R> Raccept(OperandVisitor<R> visitor) location()Returns the source location of the first token of this operand.default StringThis operand as Relix text, writing the operators of any condition it holds as glyphs.default StringprettyPrint(Spelling spelling) This operand as Relix text that parses back to an equal operand, source locations aside:price * qty,UCase(name),"it\"s".
-
Method Details
-
accept
-
location
SourceLocation location()Returns the source location of the first token of this operand. -
prettyPrint
This operand as Relix text, writing the operators of any condition it holds as glyphs. The same asprettyPrint(Spelling.GLYPHS).- Returns:
- the operand as
.relixtext; never null - Since:
- 1.0
-
prettyPrint
This operand as Relix text that parses back to an equal operand, source locations aside:price * qty,UCase(name),"it\"s". Parentheses appear only where precedence needs them, and a column whose name is a reserved word is written in backticks.spellingchooses how the operators of a condition the operand holds are written, asRelNode.prettyPrint(Spelling)does:IIf(a ≥ 1, x, y)forSpelling.GLYPHS,IIf(a >= 1, x, y)forSpelling.KEYWORDS.- Parameters:
spelling- glyphs or ASCII keywords; must not be null- Returns:
- the operand as
.relixtext; never null - Since:
- 1.0
-