def run(self, sql, autocommit=False, parameters=None):
        """
        
        """
        if isinstance(sql, basestring):
            sql = [sql]

        with closing(self.get_conn()) as conn:
            if self.supports_autocommit:
                self.set_autocommit(conn, autocommit)

            with closing(conn.cursor()) as cur:
                for s in sql:
                    if parameters is not None:
                        self.log.info("{} with parameters {}".format(s, parameters))
                        cur.execute(s, parameters)
                    else:
                        self.log.info(s)
                        cur.execute(s)

            # If autocommit was set to False for db that supports autocommit,
            # or if db does not supports autocommit, we do a manual commit.
            if not self.get_autocommit(conn):
                conn.commit()