public final class PredicateOperand extends Object
Predicate. Discriminated by
PredicateOperandKind:
PredicateOperandKind.COLUMN — carries a resolved
ColumnRef (whose own resolution/span is populated by
slices 164/165).PredicateOperandKind.LITERAL /
PredicateOperandKind.CALL /
PredicateOperandKind.COMPLEX — carry no column; the
optional verbatim text (a SQL substring derived from
sourceSpan, never reformatted) preserves the shape.The sourceSpan is the source of truth for operand text; it
is excluded from neither equality here (these objects live in ordered
lists, not dedupe sets). text, when present, is the verbatim
substring only.
Immutable. Introduced by join-analysis slice 162 (S1).
| Modifier and Type | Method and Description |
|---|---|
static PredicateOperand |
call(String text,
SourceSpan span) |
static PredicateOperand |
column(ColumnRef column,
SourceSpan span) |
static PredicateOperand |
complex(String text,
SourceSpan span) |
boolean |
equals(Object o) |
ColumnRef |
getColumn()
Non-null only for
PredicateOperandKind.COLUMN. |
PredicateOperandKind |
getKind() |
SourceSpan |
getSourceSpan()
Optional; null when the parser cannot anchor this operand.
|
String |
getText()
Optional verbatim SQL substring; may be null.
|
int |
hashCode() |
static PredicateOperand |
literal(String text,
SourceSpan span) |
String |
toString() |
public static PredicateOperand column(ColumnRef column, SourceSpan span)
public static PredicateOperand literal(String text, SourceSpan span)
public static PredicateOperand call(String text, SourceSpan span)
public static PredicateOperand complex(String text, SourceSpan span)
public PredicateOperandKind getKind()
public ColumnRef getColumn()
PredicateOperandKind.COLUMN.public SourceSpan getSourceSpan()