This defines the functions used for building window expressions.
string 'FOLLOWING'
string 'GROUPS'
string 'PRECEDING'
string 'RANGE'
string 'ROWS'
Adds current row frame exclusion.
Adds group frame exclusion.
Adds ties frame exclusion.
Adds a frame to the window.
Adds a simple groups frame to the window.
Adds one or more order clauses to the window.
Adds one or more partition expressions to the window.
Adds a simple range frame to the window.
Adds a simple rows frame to the window.
excludeCurrent(): $this
Adds current row frame exclusion.
$thisexcludeGroup(): $this
Adds group frame exclusion.
$thisexcludeTies(): $this
Adds ties frame exclusion.
$thisframe(string $type, Cake\Database\ExpressionInterface|string|int|null $startOffset, string $startDirection, Cake\Database\ExpressionInterface|string|int|null $endOffset, string $endDirection): $this
Adds a frame to the window.
Use the range(), rows() or groups() helpers if you need simple 'BETWEEN offset PRECEDING and offset FOLLOWING' frames.
You can specify any direction for both frame start and frame end.
With both $startOffset and $endOffset:
0 - 'CURRENT ROW'null - 'UNBOUNDED'string $type Frame type
Cake\Database\ExpressionInterface|string|int|null $startOffset Frame start offset
string $startDirection Frame start direction
Cake\Database\ExpressionInterface|string|int|null $endOffset Frame end offset
string $endDirection Frame end direction
$thisInvalidArgumentExceptiongroups(int|null $start, int|null $end = 0): $this
Adds a simple groups frame to the window.
See range() for details.
int|null $start Frame start
int|null $end optional Frame end If not passed in, only frame start SQL will be generated.
$thisorder(Cake\Database\ExpressionInterfaceClosure|arrayCake\Database\ExpressionInterface|string>|string $fields): $this
Adds one or more order clauses to the window.
Cake\Database\ExpressionInterfaceClosure|arrayCake\Database\ExpressionInterface|string>|string $fields Order expressions
$thispartition(Cake\Database\ExpressionInterfaceClosure|arrayCake\Database\ExpressionInterface|string>|string $partitions): $this
Adds one or more partition expressions to the window.
Cake\Database\ExpressionInterfaceClosure|arrayCake\Database\ExpressionInterface|string>|string $partitions Partition expressions
$thisrange(Cake\Database\ExpressionInterface|string|int|null $start, Cake\Database\ExpressionInterface|string|int|null $end = 0): $this
Adds a simple range frame to the window.
$start:
0 - 'CURRENT ROW'null - 'UNBOUNDED PRECEDING'$end:
0 - 'CURRENT ROW'null - 'UNBOUNDED FOLLOWING'If you need to use 'FOLLOWING' with frame start or 'PRECEDING' with frame end, use frame() instead.
Cake\Database\ExpressionInterface|string|int|null $start Frame start
Cake\Database\ExpressionInterface|string|int|null $end optional Frame end If not passed in, only frame start SQL will be generated.
$thisrows(int|null $start, int|null $end = 0): $this
Adds a simple rows frame to the window.
See range() for details.
int|null $start Frame start
int|null $end optional Frame end If not passed in, only frame start SQL will be generated.
$this
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/interface-Cake.Database.Expression.WindowInterface.html