Amp\Mysql\ResultSet::rowCount PHP Method

rowCount() public method

public rowCount ( )
    public function rowCount()
    {
        if ($this->result->state == ResultProxy::ROWS_FETCHED) {
            return new Success(count($this->result->rows));
        } else {
            $deferred = new Deferred();
            $this->result->deferreds[ResultProxy::ROWS_FETCHED][] = [$deferred, null, function () {
                return count($this->result->rows);
            }];
            return $deferred->promise();
        }
    }