ulmus/src/QueryBuilder/MssqlQueryBuilder.php

35 lines
754 B
PHP
Raw Normal View History

<?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;
}
}