source/Core/Database/Adapter/Doctrine/Database.php
private function doesStatementProduceOutput($query)
    {
        $allowedCommands = [
            // Data Manipulation Statements
            'SELECT',
            // Commands for Prepared Statements
            'EXECUTE',
            // Statements for Condition Handling
            'GET',
            // Database Administration Statements
            'SHOW',
            'CHECKSUM',
            // MySQL Utility Statements
            'DESCRIBE',
            'EXPLAIN',
            'HELP',
        ];
        $command = $this->getFirstCommandInStatement($query);

        return in_array($command, $allowedCommands);
    }
private function doesStatementProduceOutput($query)
    {
        $allowedCommands = [
            // Data Manipulation Statements
            'SELECT',
            // Commands for Prepared Statements
            'EXECUTE',
            // Statements for Condition Handling
            'GET',
            // Database Administration Statements
            'SHOW',
            'CHECKSUM',
            // MySQL Utility Statements
            'DESCRIBE',
            'EXPLAIN',
            'HELP',
        ];
        $command = $this->getFirstCommandInStatement($query);

        return in_array($command, $allowedCommands);
    }
private function doesStatementProduceOutput ( $ query ) { $ allowedCommands = [ // Data Manipulation Statements 'SELECT' , // Commands for Prepared Statements 'EXECUTE' , // Statements for Condition Handling 'GET' , // Database Administration Statements 'SHOW' , 'CHECKSUM' , // MySQL Utility Statements 'DESCRIBE' , 'EXPLAIN' , 'HELP' , ] ; $ command = $ this -> getFirstCommandInStatement ( $ query ) ; return in_array ( $ command , $ allowedCommands ) ; }
Return true, if the given SQL statement is a statement that may produce any output.

There are two kinds of SQL statements.
One class produces output like
"SELECT * FROM `countries` ORDER BY `iso_code`DESC"
Which returns something like:
+----------+----------------------------------------+
| iso_code | name                                   |
+----------+----------------------------------------+
| AF       | Afghanistan                            |
| AL       | Albania                                |
| AS       | American Samoa                         |

The other class does not produce any output like
"UPDATE countries SET (`name` = 'United States of America') WHERE iso_code = 'US'"

@param string $query The query we want to check.

@return bool Return true, if the given SQL statement is a statement that may produce any output
Return true if the given SQL statement is a statement that may produce any output .