classFrameBound
final class FrameBound
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One boundary of a window frame: UNBOUNDED, CURRENT ROW, or an offset PRECEDING or FOLLOWING.
An offset is a number, a parameter marker, or INTERVAL expr unit for a RANGE over a temporal ordering. The window that holds the boundary derives the offset. Source: https://dev.mysql.com/doc/refman/8.4/en/window-functions-frames.html.
$bound = new \SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBound(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBoundKind::Preceding, new \SqlSemantics\Platform\MySql\Statement\Literal\NumberLiteral('2'));
$bound->offset->text // => '2'new \SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBound(\SqlSemantics\Platform\MySql\Statement\Call\Window\FrameBoundKind::CurrentRow, new \SqlSemantics\Platform\MySql\Statement\Literal\NumberLiteral('1')) // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\InvalidConstructionProperties§
public FrameBoundKind $kindpublic Scalar|null $offset = nullpublic IntervalUnit|null $unit = nullMethods§
public function __construct(
public FrameBoundKind $kind,
public Scalar|null $offset = null,
public IntervalUnit|null $unit = null,
)Parameters
$kind | FrameBoundKind | The kind of boundary |
$offset | Scalar|null | The distance from the current row; present exactly for PRECEDING and FOLLOWING |
$unit | IntervalUnit|null | The unit of an INTERVAL offset |
Calls 2
- static-call Check::input() line 42
- method-call FrameBoundKind::offset() line 42
public function render(Output $out): voidWrites the boundary.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call Output::keyword() line 52
- method-call Output::node() line 54
- function-call
explodeline 56
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 4
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Call\FrameRule::bound() packages/sql-semantics-mysql/src/Lowering/Call/FrameRule.php:165
- new SqlSemantics\Platform\MySql\Lowering\Call\FrameRule::bound() packages/sql-semantics-mysql/src/Lowering/Call/FrameRule.php:168
- new SqlSemantics\Platform\MySql\Lowering\Call\FrameRule::bound() packages/sql-semantics-mysql/src/Lowering/Call/FrameRule.php:174