@ -237,6 +237,10 @@ class QueryBuilder implements IQueryBuilder {
/**
* Sets the maximum number of results to retrieve (the "limit").
*
* NOTE: Setting max results to "0" will cause mixed behaviour. While most
* of the databases will just return an empty result set, Oracle will return
* all entries.
* @param integer $maxResults The maximum number of results to retrieve.
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
@ -124,7 +124,8 @@ class QueryBuilderTest extends \Test\TestCase {
public function dataMaxResults() {
return [
[null, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
[0, []],
// Limit 0 gives mixed results: either all entries or none is returned
//[0, []],
[1, [99]],
[5, [99, 98, 97, 96, 95]],
];