Exception
9 months ago
CountOutputWalker.php
9 months ago
CountWalker.php
9 months ago
LimitSubqueryOutputWalker.php
9 months ago
LimitSubqueryWalker.php
9 months ago
Paginator.php
9 months ago
RootTypeWalker.php
9 months ago
RowNumberOverFunction.php
9 months ago
WhereInWalker.php
9 months ago
index.php
9 months ago
RowNumberOverFunction.php
23 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Tools\Pagination; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Query\AST\Functions\FunctionNode; |
| 6 | use MailPoetVendor\Doctrine\ORM\Query\AST\OrderByClause; |
| 7 | use MailPoetVendor\Doctrine\ORM\Query\Parser; |
| 8 | use MailPoetVendor\Doctrine\ORM\Query\SqlWalker; |
| 9 | use MailPoetVendor\Doctrine\ORM\Tools\Pagination\Exception\RowNumberOverFunctionNotEnabled; |
| 10 | use function trim; |
| 11 | class RowNumberOverFunction extends FunctionNode |
| 12 | { |
| 13 | public $orderByClause; |
| 14 | public function getSql(SqlWalker $sqlWalker) |
| 15 | { |
| 16 | return 'ROW_NUMBER() OVER(' . trim($sqlWalker->walkOrderByClause($this->orderByClause)) . ')'; |
| 17 | } |
| 18 | public function parse(Parser $parser) |
| 19 | { |
| 20 | throw RowNumberOverFunctionNotEnabled::create(); |
| 21 | } |
| 22 | } |
| 23 |