@staticmethod
def _set_autocommit(conn, auto):
    """
        Get connection auto commit attribute
        :param conn:
        :param auto:
        :return:
        """
    try:
        conn.autocommit(auto)
    except AttributeError:
        with conn.cursor() as cursor:
            cursor.execute('SET AUTOCOMMIT=%s;' % auto)
