Class PriorExpression
java.lang.Object
dev.frostlake.executor.expressions.ColumnReferenceExpression
dev.frostlake.executor.expressions.PriorExpression
- All Implemented Interfaces:
Expression
PRIOR <column> inside a CONNECT BY predicate: the column's value on the PARENT row of
the hierarchy step being considered, as opposed to the candidate child row every other reference reads.
The hierarchy expansion evaluates the predicate against a combined row that carries the candidate's
values followed by the parent's, exposed under PRIOR_PREFIX-prefixed column names — so this is
modelled as an ordinary ColumnReferenceExpression to that prefixed name and every consumer that
pattern-matches on column references (equi-key extraction, GROUP BY resolution, the AST printer) keeps
working unchanged. Outside a CONNECT BY the prefixed column does not exist, and the evaluator turns the
lookup failure into an explicit "PRIOR is only allowed in a CONNECT BY clause" error.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPrefix of the synthesized parent-row column names produced by the CONNECT BY expansion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe column name as written afterPRIOR, for error messages.toString()Methods inherited from class dev.frostlake.executor.expressions.ColumnReferenceExpression
accept, describeStar, getColumnName, getPosition, getPositionalOrdinal, getStarArgument, getTableName, getWrittenName, isQualified, setWrittenName
-
Field Details
-
PRIOR_PREFIX
Prefix of the synthesized parent-row column names produced by the CONNECT BY expansion.- See Also:
-
-
Constructor Details
-
PriorExpression
-
-
Method Details
-
getBaseColumnName
The column name as written afterPRIOR, for error messages. -
toString
- Overrides:
toStringin classColumnReferenceExpression
-