(
    domain: str,
    xmlns: str,
    start_datetime: datetime,
    end_datetime: datetime,
)
return paginate_query_across_partitioned_databases(
        XFormInstanceSQL, q_expr, load_source='forms_by_xmlns_received_on'
    )
Iterates form submissions of a given ``xmlns`` from
    ``start_datetime`` (incl) to ``end_datetime`` (excl).
Iterates form submissions of a given ``xmlns`` from
    ``start_datetime`` (incl) to ``end_datetime`` (excl).
Iterates form submissions of a given xmlns from start_datetime ( incl ) to end_datetime ( excl ) .
def iter_forms_by_xmlns_received_on(
    domain: str,
    xmlns: str,
    start_datetime: datetime,
    end_datetime: datetime,
) -> Iterator[XFormInstanceSQL]:
    """
    Iterates form submissions of a given ``xmlns`` from
    ``start_datetime`` (incl) to ``end_datetime`` (excl).
    """
    # ``start_datetime`` is inclusive and ``end_datetime`` is
    # exclusive so that a form submitted at midnight will be
    # returned for the day that is starting, not the day that is
    # ending. That seems to be intuitive.
    from corehq.sql_db.util import paginate_query_across_partitioned_databases

    q_expr = (
        Q(domain=domain)
        & Q(state=XFormInstanceSQL.NORMAL)
        & Q(xmlns=xmlns)
        & Q(received_on__gte=start_datetime, received_on__lt=end_datetime)
    )
    return paginate_query_across_partitioned_databases(
        XFormInstanceSQL, q_expr, load_source='forms_by_xmlns_received_on'
    )
def iter_forms_by_xmlns_received_on ( domain : str , xmlns : str , start_datetime : datetime , end_datetime : datetime , ) -> Iterator [ XFormInstanceSQL ] : # ``start_datetime`` is inclusive and ``end_datetime`` is # exclusive so that a form submitted at midnight will be # returned for the day that is starting, not the day that is # ending. That seems to be intuitive. from corehq . sql_db . util import paginate_query_across_partitioned_databases q_expr = ( Q ( domain = domain ) & Q ( state = XFormInstanceSQL . NORMAL ) & Q ( xmlns = xmlns ) & Q ( received_on__gte = start_datetime , received_on__lt = end_datetime ) ) return paginate_query_across_partitioned_databases ( XFormInstanceSQL , q_expr , load_source = 'forms_by_xmlns_received_on' )