(db, doc_types, iteration_key, chunk_size=100,
                                    view_event_handler=None, domain=None)
return resumable_view_iterator(db, iteration_key, view_name, keys, chunk_size, view_event_handler)
Perform one-time resumable iteration over documents by type

    Iteration can be efficiently stopped and resumed. The iteration may
    omit documents that are added after the iteration begins or resumes
    and may include deleted documents.

    :param db: Couchdb database.
    :param doc_types: A list of doc type names to iterate on (can't be empty).
    :param iteration_key: A unique key identifying the iteration. This
    key will be used to maintain state about an iteration that is in progress.
    The state will be maintained indefinitely unless it is removed with `discard_state()`.
    :param chunk_size: Number of documents to yield before updating the
    iteration checkpoint. In the worst case about this many documents
    that were previously yielded may be yielded again if the iteration
    is stopped and later resumed.
    :param domain: If the domain is specified only iterate over docs for that domain
Perform one-time resumable iteration over documents by type
Perform one - time resumable iteration over documents by type
def resumable_docs_by_type_iterator(db, doc_types, iteration_key, chunk_size=100,
                                    view_event_handler=None, domain=None):
    """Perform one-time resumable iteration over documents by type

    Iteration can be efficiently stopped and resumed. The iteration may
    omit documents that are added after the iteration begins or resumes
    and may include deleted documents.

    :param db: Couchdb database.
    :param doc_types: A list of doc type names to iterate on (can't be empty).
    :param iteration_key: A unique key identifying the iteration. This
    key will be used to maintain state about an iteration that is in progress.
    The state will be maintained indefinitely unless it is removed with `discard_state()`.
    :param chunk_size: Number of documents to yield before updating the
    iteration checkpoint. In the worst case about this many documents
    that were previously yielded may be yielded again if the iteration
    is stopped and later resumed.
    :param domain: If the domain is specified only iterate over docs for that domain
    """

    view_name = 'by_domain_doc_type_date/view' if domain else 'all_docs/by_doc_type'

    def _get_key(doc_type):
        if domain:
            return [domain, doc_type]
        return [doc_type]

    keys = [_get_key(doc_type) for doc_type in doc_types]

    return resumable_view_iterator(db, iteration_key, view_name, keys, chunk_size, view_event_handler)
def resumable_docs_by_type_iterator ( db , doc_types , iteration_key , chunk_size = 100 , view_event_handler = None , domain = None ) : view_name = 'by_domain_doc_type_date/view' if domain else 'all_docs/by_doc_type' def _get_key ( doc_type ) : if domain : return [ domain , doc_type ] return [ doc_type ] keys = [ _get_key ( doc_type ) for doc_type in doc_types ] return resumable_view_iterator ( db , iteration_key , view_name , keys , chunk_size , view_event_handler )