classFrame
final class Frame
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The frame of a window: its unit, its boundaries and its exclusion.
The short form names the start only, which is not FOLLOWING, and ends at the current row; the BETWEEN form names both ends. UNBOUNDED FOLLOWING cannot start a frame and UNBOUNDED PRECEDING cannot end one. Source: https://dev.mysql.com/doc/refman/8.4/en/window-functions-frames.html.
$frame = new \SqlSemantics\Platform\MySql\Statement\Call\Window\Frame(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameUnit::Rows, new \SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBound(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBoundKind::UnboundedPreceding), new \SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBound(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBoundKind::CurrentRow));
$frame->end?->kind // => \SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBoundKind::CurrentRownew \SqlSemantics\Platform\MySql\Statement\Call\Window\Frame(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameUnit::Rows, new \SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBound(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBoundKind::UnboundedFollowing)) // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\InvalidConstructionProperties§
public FrameUnit $unitpublic FrameBound $startpublic FrameBound|null $end = nullpublic FrameExclusion|null $exclusion = nullMethods§
public function __construct(
public FrameUnit $unit,
public FrameBound $start,
public FrameBound|null $end = null,
public FrameExclusion|null $exclusion = null,
)Parameters
$unit | FrameUnit | The unit |
$start | FrameBound | The start boundary |
$end | FrameBound|null | The end boundary of the BETWEEN form |
$exclusion | FrameExclusion|null | The written exclusion |
Calls 4
- static-call Check::input() line 40
- class-const FrameBoundKind::UnboundedFollowing() line 40
- class-const FrameBoundKind::Following() line 41
- class-const FrameBoundKind::UnboundedPreceding() line 42
public function offsets(): list<Scalar>Answers the offsets of the boundaries, in written order.
Returns
list<Scalar>Test cases 1
public function render(Output $out): voidWrites the frame.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call Output::keyword() line 67
- method-call Output::node() line 69
- function-call
explodeline 74
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.