public function formatSql($sql, $tabOffset = 3)
    {
        $tab = Formatter::$tab;
        $indent = '';

        for ($i = 0; $i < $tabOffset; ++$i) {
            $indent .= $tab;
        }

        $sql = explode("\n", Formatter::format($sql, false));
        $indentedLines = array();

        foreach ($sql as $line) {
            $indentedLines[] = $indent.str_replace('"', '\"', $line);
        }

        return implode("\n", $indentedLines);
    }