public final class FrameBound extends Object
start or
end of a WindowFrame.
FrameBound.Kind.PRECEDING and FrameBound.Kind.FOLLOWING optionally carry an
offsetLiteral string ("1", "INTERVAL '7' DAY", etc.) — the literal
offset spelled by the SQL author.
offsetLiteral is presentation text, not canonical text.
It is captured directly from TExpression.toString() on the parser
side, which preserves SQL whitespace and casing. Two SQLs that spell the
same offset differently (e.g. 1 vs 01 vs 1.0) MUST
NOT be expected to produce equal offsetLiteral; JSON byte-stability
is only a contract for the same SQL parsed twice.
The slice-22 builder rejects offsets whose AST type is not
simple_constant_t — column refs (simple_object_name_t) and
parenthesised expressions (parenthesis_t) are reachable in
PostgreSQL / ANSI grammars but rejected at build time.
FrameBound.Kind.UNBOUNDED_PRECEDING / FrameBound.Kind.UNBOUNDED_FOLLOWING /
FrameBound.Kind.CURRENT_ROW forbid an offsetLiteral; the constructor
fails fast if one is supplied.
Bare FrameBound.Kind.PRECEDING / FrameBound.Kind.FOLLOWING without an
explicit offset is permitted by this constructor for forward-compat / a
closed domain, but the slice-22 probe across nine vendor grammars showed
no parser surface emits this shape today.
| Modifier and Type | Class and Description |
|---|---|
static class |
FrameBound.Kind |
| Constructor and Description |
|---|
FrameBound(FrameBound.Kind kind,
String offsetLiteral) |
| Modifier and Type | Method and Description |
|---|---|
FrameBound.Kind |
getKind() |
String |
getOffsetLiteral() |
public FrameBound(FrameBound.Kind kind, String offsetLiteral)
public FrameBound.Kind getKind()
public String getOffsetLiteral()