private function mysqlQuery(array $database)
    {
        $query = 'SELECT'
            . ' ('
            . 'SUM(data_length+index_length+data_free)'
            . ' + (COUNT(*) * 300 * 1024)'
            . ')'
            . '/' . (1048576 + 150) . ' AS estimated_actual_disk_usage'
            . ' FROM information_schema.tables';

        /** @var \Platformsh\Cli\Service\Relationships $relationships */
        $relationships = $this->getService('relationships');
        $connectionParams = $relationships->getDbCommandArgs('mysql', $database, '');

        return sprintf(
            "mysql %s --no-auto-rehash --raw --skip-column-names --execute '%s'",
            $connectionParams,
            $query
        );
    }
private function mysqlQuery(array $database)
    {
        $query = 'SELECT'
            . ' ('
            . 'SUM(data_length+index_length+data_free)'
            . ' + (COUNT(*) * 300 * 1024)'
            . ')'
            . '/' . (1048576 + 150) . ' AS estimated_actual_disk_usage'
            . ' FROM information_schema.tables';

        /** @var \Platformsh\Cli\Service\Relationships $relationships */
        $relationships = $this->getService('relationships');
        $connectionParams = $relationships->getDbCommandArgs('mysql', $database, '');

        return sprintf(
            "mysql %s --no-auto-rehash --raw --skip-column-names --execute '%s'",
            $connectionParams,
            $query
        );
    }
private function mysqlQuery ( array $ database ) { $ query = 'SELECT' . ' (' . 'SUM(data_length+index_length+data_free)' . ' + (COUNT(*) * 300 * 1024)' . ')' . '/' . ( 1048576 + 150 ) . ' AS estimated_actual_disk_usage' . ' FROM information_schema.tables' ; /** @var \Platformsh\Cli\Service\Relationships $relationships */ $ relationships = $ this -> getService ( 'relationships' ) ; $ connectionParams = $ relationships -> getDbCommandArgs ( 'mysql' , $ database , '' ) ; return sprintf ( "mysql %s --no-auto-rehash --raw --skip-column-names --execute '%s'" , $ connectionParams , $ query ) ; }
Returns a command to query disk usage for a MySQL database.

@param array $database The database connection details.

@return string
Returns a command to query disk usage for a MySQL database .