Returns the first selected row, or null if zero rows were returned
@return array|null
502642
public function getFirst()
    {
        $row = $this->getIterator()->current();

        if ($row !== null) {
            $this->close(); // don't leave the SQL statement open
        }

        return $row;
    }
234237
public function getFirst()
    {
        if (count($this->children)) {
            reset($this->children);
            return current($this->children);
        } else {
            return null;
        }
    }
55477
public function first()
	{
		$set = array_slice($this->list, 0, 1, true);
		
		return isset($set[0]) ? $set[0] : null;
	}
1206836
public function first()
    {
        if ($this->isEmpty()) {
            return $this->makeItem(null);
        }

        $arResultIDList = $this->arElementIDList;

        $iElementID = array_shift($arResultIDList);

        return $this->makeItem($iElementID);
    }
593920
public function first()
    {
        try {
            $row = $this->baseQuery->first();

            if ($row === null) {
                return $row;
            } else {
                return $this->processFetchedRow($row);
            }
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
674126
public function getRowAt($row_num)
    {
        if ($this->seek($row_num)) {
            $this->next();

            return $this->getCurrentRow();
        } else {
            return null;
        }
    }
1249253
public function getRow()
	{
		debug_assert( false, 'Function getRow is scheduled for deletion, replace with Model::getById( $id )' );

		$key = $this->getPrimaryKey();
		if( null !== $key )
		{
			$ret = static::getById( $key );
		}
		else
		{
			$ret = null;
		}
		return $ret;
	}
848189
public function getFirst()
    {
        if (is_array($this->queryResult)) {
            $queryResult = &$this->queryResult;
        } else {
            $query = clone $this->query;
            $query->setLimit(1);
            $queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQuery($query));
        }
        return (isset($queryResult[0])) ? $queryResult[0] : null;
    }
485050
public function findLast()
    {
        $sql = sprintf("SELECT id, name, created_at FROM {$this->tableName} ORDER BY id DESC LIMIT 1");
        if ($row = $this->adapter->selectRow($sql)) {
            return $this->_makeModel($row);
        }

        return null;
    }
1192818
protected function first()
    {
        foreach ($this->sortable as $key => $value) {
            if (is_numeric($key)) {
                return $value;
            }

            return $key;
        }

        return null;
    }
738594
public function current()
    {
        return (($this->rows_count != null && $this->rows_count > 0 ) || !$this->isEmpty())
            ? $this->get($this->position)
            : null
            ;
    }
875818
public function first()
    {
        $oldLimit = $this->limit;
        $this->limit = 1;
        $rows = $this->get();
        $this->limit = $oldLimit;
        return isset($rows[0]) ? $rows[0] : null;
    }
1199519
public function getRows()
    {
        if (!$this->rows) {
            $this->rows = new Rows([$this->dbData], $this->newTable(), null, get_class($this));
        }
        return $this->rows;
    }
1280351
public function rowCount()
    {
        try {
            if ($this->stmt) {
                return $this->stmt->rowCount();
            }
            return null;
        } catch (\PDOException $e) {
            die("Error: " . $e->getMessage());
        }
    }
782554
protected function getQueryResultRow()
    {
        if ($this->fetchedResults === null) {
            $this->fetchedResults = $this
                ->getQueryResult()
                ->fetchAll();
        }

        return array_shift($this->fetchedResults);
    }
916669
public function first()
    {
        $results = $this->filter('', '', '', ['$top'=> 1]);
        $result = is_array($results) && count($results) > 0 ? $results[0] : null;

        return $result;
    }
1044156
public function findOne() {
        $this->statementContext->setLimit(1);

        $statement = new SelectStatement();
        $statement->setStatementContext($this->statementContext);
        $statement->setCondition($this->condition);
        $sql = $statement->parse();

        $row = $this->connection->query($sql, $this->statementContext->getParameters());

        $this->clear();

        return $row;
    }