protected function getFirstCommandInStatement($query)
    {
        $sqlComments = '@(([\'"]).*?[^\\\]\2)|((?:\#|--).*?$|/\*(?:[^/*]|/(?!\*)|\*(?!/)|(?R))*\*\/)\s*|(?<=;)\s+@ms';
        $uncommentedQuery = preg_replace($sqlComments, '$1', $query);

        $command = strtoupper(
            trim(
                explode(' ', trim($uncommentedQuery))[0]
            )
        );

        return $command;
    }