Your ROOT_URL in app.ini is https://code.exacti.com.br/ but you are visiting https://git.exacti.com.br/ExacTI/phacil-framework/src/commit/329edd9f34caf4a075b6b5c3ee8076f47b0e60aa/system/MagiQL/Builder/Syntax/Adapt/PostgreSQL/SelectWriter.php You should set ROOT_URL correctly, otherwise the web may not work correctly.
A super easy PHP Framework for web development! https://github.com/exacti/phacil-framework

39 lines
979 B

<?php
/**
* Copyright © 2024 ExacTI Technology Solutions. All rights reserved.
* GPLv3 General License.
* https://exacti.com.br
* Phacil PHP Framework - https://github.com/exacti/phacil-framework
*/
namespace Phacil\Framework\MagiQL\Builder\Syntax\Adapt\PostgreSQL;
use Phacil\Framework\MagiQL\Builder\Syntax\SelectWriter as GenericSelectWriter;
use Phacil\Framework\MagiQL\Manipulation\Select;
class SelectWriter extends GenericSelectWriter
{
/**
* @param Select $select
* @param array $parts
*
* @return $this
*/
protected function writeSelectLimit(Select $select, array &$parts)
{
$mask = $this->getStartingLimit($select) . $this->getLimitCount($select);
$limit = '';
if ($mask !== '00') {
$start = $this->placeholderWriter->add($select->getLimitStart());
$count = $this->placeholderWriter->add($select->getLimitCount());
$limit = "LIMIT {$count} OFFSET {$start}";
}
$parts = \array_merge($parts, [$limit]);
return $this;
}
}