35 lines
754 B
PHP
35 lines
754 B
PHP
|
<?php
|
||
|
|
||
|
namespace Ulmus\QueryBuilder;
|
||
|
|
||
|
use Ulmus\QueryBuilder;
|
||
|
|
||
|
use Ulmus\Query;
|
||
|
|
||
|
class MssqlQueryBuilder extends QueryBuilder implements Ulmus\Query\QueryBuilderInterface
|
||
|
{
|
||
|
public function limit(int $value) : self
|
||
|
{
|
||
|
if ( null === $offset = $this->getFragment(Query\MsSQL\Offset::class) ) {
|
||
|
$offset = new Query\MsSQL\Offset();
|
||
|
$this->push($offset);
|
||
|
}
|
||
|
|
||
|
$offset->limit = $value;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function offset(int $value) : self
|
||
|
{
|
||
|
if ( null === $offset = $this->getFragment(Query\MsSQL\Offset::class) ) {
|
||
|
$offset = new Query\MsSQL\Offset();
|
||
|
$this->push($offset);
|
||
|
}
|
||
|
|
||
|
$offset->offset = $value;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
}
|