#NEWLINE# def get_all_docs_with_doc_types( db , doc_types ) : #NEWLINE# #INDENT# '\n    doc_types must be a sequence of doc_types\n\n    returns doc JSON (not wrapped)\n    ' #NEWLINE# if isinstance ( doc_types , basestring ) : #NEWLINE# #INDENT# raise TypeError ( 'get_all_docs_with_doc_types requires doc_types to be a sequence of strings, not {!r}' . format ( doc_types ) ) #NEWLINE# #UNINDENT# for doc_type in doc_types : #NEWLINE# #INDENT# results = paginate_view ( db , 'all_docs/by_doc_type' , chunk_size = 100 , startkey = [ results ] , endkey = [ doc_type , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ] , include_docs = True , reduce = False ) #NEWLINE# for result in results : #NEWLINE# #INDENT# ( yield result [ 'doc' ] )