'Runs a command or a list of commands. Pass a list of sql
statements to the sql parameter to get them to execute
sequentially
:param sql: the sql statement to be executed (str) or a list of
sql statements to execute
:type sql: str or list
:param autocommit: What to set the connection\'s autocommit setting to
before executing the query.
:type autocommit: bool
:param parameters: The parameters to render the SQL query with.
:type parameters: mapping or iterable'

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 (sys.version_info[0] < 3):
                    s = s.encode('utf-8')
                logging.info(s)
                if (parameters is not None):
                    cur.execute(s, parameters)
                else:
                    cur.execute(s)
        conn.commit()
