(domain, case_ids)
Given a base list of case ids, gets all ids of cases they reference (parent and host cases)
Given a base list of case ids, gets all ids of cases they reference (parent and host cases)
Given a base list of case ids gets all ids of cases they reference ( parent and host cases )
def get_indexed_case_ids(domain, case_ids):
        """
        Given a base list of case ids, gets all ids of cases they reference (parent and host cases)
        """
        if not case_ids:
            return []

        with CommCareCaseIndexSQL.get_plproxy_cursor(readonly=True) as cursor:
            cursor.execute(
                'SELECT referenced_id FROM get_multiple_cases_indices(%s, %s)',
                [domain, list(case_ids)]
            )
            results = fetchall_as_namedtuple(cursor)
            return [result.referenced_id for result in results]
def get_indexed_case_ids ( domain , case_ids ) : if not case_ids : return [ ] with CommCareCaseIndexSQL . get_plproxy_cursor ( readonly = True ) as cursor : cursor . execute ( 'SELECT referenced_id FROM get_multiple_cases_indices(%s, %s)' , [ domain , list ( case_ids ) ] ) results = fetchall_as_namedtuple ( cursor ) return [ result . referenced_id for result in results ]