def raw(self, sql, params=None, bindings=None, delim=None, comments=comments, maxrows=None):
        """ execute the sql and return a tuple of (headers, results) """
        if delim:
            headers = []
            results = []
            if type(sql) == type(StringType):
                if comments: sql = comments(sql)
                statements = filter(lambda x: len(x) > 0,
                        map(lambda statement: statement.strip(), sql.split(delim)))
            else:
                statements = [sql]
            for a in statements:
                self.__execute__(a, params, bindings, maxrows=maxrows)
                headers.append(self.headers)
                results.append(self.results)
            self.headers = headers
            self.results = results
        else:
            self.__execute__(sql, params, bindings, maxrows=maxrows)
        return (self.headers, self.results)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/dbexts.py/dbexts.raw/original