public function size()
    {
        if ($this->_resultsCache) {
            return count($this->_resultsCache);
        }

        return $this->query->getCount($this->connection);
    }
public function size()
    {
        if ($this->_resultsCache) {
            return count($this->_resultsCache);
        }

        return $this->query->getCount($this->connection);
    }
public function size ( ) { if ( $ this -> _resultsCache ) { return count ( $ this -> _resultsCache ) ; } return $ this -> query -> getCount ( $ this -> connection ) ; }
Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
executed by the corresponding object.

If the last SQL statement executed by the associated Statement object was a SELECT statement,
some databases may return the number of rows returned by that statement. However,
this behaviour is not guaranteed for all databases and should not be
relied on for portable applications.

@throws \Doctrine\DBAL\DBALException

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>

@throws \Eddmash\PowerOrm\Exception\KeyError
Returns the number of rows affected by the last DELETE INSERT or UPDATE statement executed by the corresponding object .