Merge pull request #6685 from votemike/update-maxresult-docblocks
Updating `Query#$_maxResults` to allow for `null` (no limit)
This commit is contained in:
commit
8b81691e77
@ -163,7 +163,7 @@ final class Query extends AbstractQuery
|
|||||||
/**
|
/**
|
||||||
* The maximum number of results to return (the "limit").
|
* The maximum number of results to return (the "limit").
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var integer|null
|
||||||
*/
|
*/
|
||||||
private $_maxResults = null;
|
private $_maxResults = null;
|
||||||
|
|
||||||
@ -628,7 +628,7 @@ final class Query extends AbstractQuery
|
|||||||
/**
|
/**
|
||||||
* Sets the maximum number of results to retrieve (the "limit").
|
* Sets the maximum number of results to retrieve (the "limit").
|
||||||
*
|
*
|
||||||
* @param integer $maxResults
|
* @param integer|null $maxResults
|
||||||
*
|
*
|
||||||
* @return Query This query object.
|
* @return Query This query object.
|
||||||
*/
|
*/
|
||||||
@ -644,7 +644,7 @@ final class Query extends AbstractQuery
|
|||||||
* Gets the maximum number of results the query object was set to retrieve (the "limit").
|
* Gets the maximum number of results the query object was set to retrieve (the "limit").
|
||||||
* Returns NULL if {@link setMaxResults} was not applied to this query.
|
* Returns NULL if {@link setMaxResults} was not applied to this query.
|
||||||
*
|
*
|
||||||
* @return integer Maximum number of results.
|
* @return integer|null Maximum number of results.
|
||||||
*/
|
*/
|
||||||
public function getMaxResults()
|
public function getMaxResults()
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ class QueryBuilder
|
|||||||
/**
|
/**
|
||||||
* The maximum number of results to retrieve.
|
* The maximum number of results to retrieve.
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var integer|null
|
||||||
*/
|
*/
|
||||||
private $_maxResults = null;
|
private $_maxResults = null;
|
||||||
|
|
||||||
@ -653,7 +653,7 @@ class QueryBuilder
|
|||||||
/**
|
/**
|
||||||
* Sets the maximum number of results to retrieve (the "limit").
|
* Sets the maximum number of results to retrieve (the "limit").
|
||||||
*
|
*
|
||||||
* @param integer $maxResults The maximum number of results to retrieve.
|
* @param integer|null $maxResults The maximum number of results to retrieve.
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
@ -668,7 +668,7 @@ class QueryBuilder
|
|||||||
* Gets the maximum number of results the query object was set to retrieve (the "limit").
|
* Gets the maximum number of results the query object was set to retrieve (the "limit").
|
||||||
* Returns NULL if {@link setMaxResults} was not applied to this query builder.
|
* Returns NULL if {@link setMaxResults} was not applied to this query builder.
|
||||||
*
|
*
|
||||||
* @return integer Maximum number of results.
|
* @return integer|null Maximum number of results.
|
||||||
*/
|
*/
|
||||||
public function getMaxResults()
|
public function getMaxResults()
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ class LimitSubqueryWalker extends TreeWalkerAdapter
|
|||||||
$fromRoot = reset($from);
|
$fromRoot = reset($from);
|
||||||
|
|
||||||
if ($query instanceof Query
|
if ($query instanceof Query
|
||||||
&& $query->getMaxResults()
|
&& null !== $query->getMaxResults()
|
||||||
&& $AST->orderByClause
|
&& $AST->orderByClause
|
||||||
&& count($fromRoot->joins)) {
|
&& count($fromRoot->joins)) {
|
||||||
// Check each orderby item.
|
// Check each orderby item.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user