protected function getAllRecordsMatchingQueryConditions(ReadQuery $query)
    {
        $records = [];
        foreach ($this->getIterator($query->getCollection()) as $record) {
            $records[] = $record;
        }

        if (!$query->getConditions()) {
            return $records;
        }

        foreach ($records as $key => $record) {
            if (!$this->recordMatchesQuery($record, $query)) {
                unset($records[$key]);
            }
        }

        return $records;
    }