get all records in database

@param  integer  $limit
@return Model
343299
public function all($limit = null)
    {
        if($limit){
            return $this->model->limit($limit)->get();
        }

        return $this->model->all();
    }
1315973
public function getTopTraderEntityData($limit = 10)
    {
        $topTrader = $this->gameDataService->getTopJobCharacter(1);

        return $topTrader->setMaxResults($limit)
            ->getQuery()
            ->getResult();
    }
211162
public function limit($limit = null) {
		if (is_null($limit)) //remove options
			return $this->discard('query.limit');
	
		return $this->merge(['query.limit' => intval($limit)]);
	}
759354
public function get_entries($start=0, $limit=10) {
        global $DB;

        if ($this->entries === null) {
            if ($sqlarray = $this->get_entry_fetch_sql(false, 'created DESC')) {
                $this->entries = $DB->get_records_sql($sqlarray['sql'], $sqlarray['params'], $start, $limit);
                if (!$start && count($this->entries) < $limit) {
                    $this->totalentries = count($this->entries);
                }
            } else {
                return false;
            }
        }

        return $this->entries;
    }
242139
public function all($fields = null, $limit = null)
    {
        $result = $this->storage;

        if (isset($limit)) {
            $result = array_slice($this->storage, $limit);
        }

        if (empty($fields)) {
            return $this->result = new ArrayIterator($result);
        } else {
            $this->result = new ArrayIterator();

            foreach ($result as $row) {
                $item = new SplArrayObject();
                foreach ($fields as $field) {
                    if ($row->offsetExists($field)) {
                        $item[ $field ] = $row->offsetGet($field);
                    }
                }

                $this->result[] = $item;
            }

            return $this->result;
        }

        return false;
    }
380788
public function loadAll(array $criteria = [], $limit = null)
    {
        $qb = $this->dm->createQueryBuilder($this->class->name)->addCriteria($criteria);

        return $qb->getQuery()->limit($limit)->execute();
    }
1105277
public function read($limit = 0)
    {
        $this->limit($limit);
        $query = $this->buildSelect();
        $this->run($query['query'], $query['param']);

        return $this->next();
    }
213056
public function limit($limit) : QueryBuilder
    {
        $this->_query[] = "LIMIT";

        if(is_array($limit)) {
            $this->_query[] = $this->getQuoted($limit[0]).",";
            $this->_query[] = $this->getQuoted($limit[1]);

            return $this;
        }

        $this->_query[] = $this->getQuoted($limit);

        return $this;
    }
1083424
public function findAll($limit = 0, $offset = 0)
    {
        $limit = $this->getLimit($limit, $offset);
        $query = 'SELECT ' . $this->getFields(", ") . '
                  FROM ' . $this->tableName . '
                  ' . $limit . ' ;';
        $statement = $this->database->prepare($query);
        $statement->execute();
        return $this->buildAll($statement->fetchAll());
    }
246473
public function getCollectionByType($type, $limit)
    {
        $collection = $this->addFieldToFilter(
            'enrolment_status',
            [
                'in' => [
                    \Dotdigitalgroup\Email\Model\Sync\Automation::AUTOMATION_STATUS_PENDING,
                    \Dotdigitalgroup\Email\Model\Sync\Automation::CONTACT_STATUS_CONFIRMED
                ]
            ]
        )->addFieldToFilter(
            'automation_type',
            $type
        );
        //limit because of the each contact request to get the id
        $collection->getSelect()->limit($limit);

        return $collection;
    }
654684
public function _getRecords($identifier, $limit, $offset) {
		return $this->Table
			->find()
			->where([$this->Table->alias() . '.model' => $identifier])
			->limit($limit)
			->offset($offset)
			->all();
	}
982355
public function getItemsWithImportingStatus($limit)
    {
        $collection = $this->addFieldToFilter(
            'import_status',
            ['eq' => \Dotdigitalgroup\Email\Model\Importer::IMPORTING]
        )
            ->addFieldToFilter('import_id', ['neq' => ''])
            ->setPageSize($limit)
            ->setCurPage(1);

        if ($collection->getSize()) {
            return $collection;
        }

        return false;
    }
1324558
public function limit($limit = null)
    {
        if (isset($limit)) {
            $this->setLimit($limit);

            return $this;
        }

        return $this->getLimit();
    }
971117
public function getList($limit = 100)
    {
        $request = new Request('customizations');
        $request->setQuery(['limit' =>$limit]);

        $response = $this->client->get($request);

        $this->assertSuccessResponse($response);

        return $response->getData();
    }
905994
public function getExpiredCodes($limit = 100)
    {
        $query = $this->createQueryBuilder('p')
            ->select('p')
            ->andWhere('p.expire < :expire')
            ->setParameter('expire', new \DateTime())
            ->orderBy('p.expire', 'asc')
            ->setMaxResults($limit)
            ->getQuery();

        return $query->getResult();
    }
698211
public function take($limit): CollectionInterface
    {
        if ($limit >= 0) {
            return $this->takeFirst($limit);
        } else {
            return $this->takeLast(abs($limit));
        }
    }
822675
protected function getAll(array $columns = [], $limit = - 1)
    {
        $query = [
            'TableName' => $this->getTable(),
        ];
        $op    = 'Scan';
        if ($limit > - 1) {
            $query['limit'] = $limit;
        }
        if ( ! empty( $columns )) {
            $query['AttributesToGet'] = $columns;
        }
        // If the $where is not empty, we run getIterator.
        if ( ! empty( $this->where )) {
            // Primary key or index key condition exists, then use Query instead of Scan.
            // However, Query only supports a few conditions.
            if ($key = $this->conditionsContainIndexKey()) {
                $condition = array_get($this->where, "$key.ComparisonOperator");
                if (ComparisonOperator::isValidQueryDynamoDbOperator($condition)) {
                    $op                     = 'Query';
                    $query['IndexName']     = $this->dynamoDbIndexKeys[$key];
                    $query['KeyConditions'] = $this->where;
                }
            }
            $query['ScanFilter'] = $this->where;
        }

        // Sorting.
        $query['ScanIndexForward'] = $this->scanIndexForward;

        $iterator = $this->client->getIterator($op, $query);
        $results  = [];
        foreach ($iterator as $item) {
            $item  = $this->unmarshalItem($item);
            $model = new static($item, static::$dynamoDb);
            $model->setUnfillableAttributes($item);
            $model->exists = true;
            $model->syncOriginal();

            $results[] = $model;
        }

        return new Collection($results);
    }