protected function getDatabaseSize($connection)
    {
        switch ($this->getDriverName($connection)) {
            case 'mysql':
                $size = $this->checkMySqlDatabaseSize($connection);
                break;
            case 'sqlite':
                $size = $this->checkSqLiteDatabaseSize($connection);
                break;
            case 'pgsql':
                $size = $this->checkPostgresDatabaseSize($connection);
                break;
            case 'sqlsrv':
                $size = $this->checkSqlServerDatabaseSize($connection);
                break;
            default:
                $this->eye->logger()->debug('Unable to find DB driver for size', $connection);
                return -1;
        }

        return round($size/1024/1024, 2);
    }
protected function getDatabaseSize($connection)
    {
        switch ($this->getDriverName($connection)) {
            case 'mysql':
                $size = $this->checkMySqlDatabaseSize($connection);
                break;
            case 'sqlite':
                $size = $this->checkSqLiteDatabaseSize($connection);
                break;
            case 'pgsql':
                $size = $this->checkPostgresDatabaseSize($connection);
                break;
            case 'sqlsrv':
                $size = $this->checkSqlServerDatabaseSize($connection);
                break;
            default:
                $this->eye->logger()->debug('Unable to find DB driver for size', $connection);
                return -1;
        }

        return round($size/1024/1024, 2);
    }
protected function getDatabaseSize ( $ connection ) { switch ( $ this -> getDriverName ( $ connection ) ) { case 'mysql' : $ size = $ this -> checkMySqlDatabaseSize ( $ connection ) ; break ; case 'sqlite' : $ size = $ this -> checkSqLiteDatabaseSize ( $ connection ) ; break ; case 'pgsql' : $ size = $ this -> checkPostgresDatabaseSize ( $ connection ) ; break ; case 'sqlsrv' : $ size = $ this -> checkSqlServerDatabaseSize ( $ connection ) ; break ; default : $ this -> eye -> logger ( ) -> debug ( 'Unable to find DB driver for size' , $ connection ) ; return - 1 ; } return round ( $ size / 1024 / 1024 , 2 ) ; }
Get the size of the database.

@param  string  $connection
@return int
Get the size of the database .