(self, from_db, last_doc_pk=None, limit=500)
:param from_db: The DB alias to query
        :param last_doc_pk: The primary key of the last doc from the previous batch
        :param limit: Desired batch size
        :return: Generator of DocIds namedtuple
:param from_db: The DB alias to query
        :param last_doc_pk: The primary key of the last doc from the previous batch
        :param limit: Desired batch size
        :return: Generator of DocIds namedtuple
: param from_db : The DB alias to query : param last_doc_pk : The primary key of the last doc from the previous batch : param limit : Desired batch size : return : Generator of DocIds namedtuple
def get_doc_ids(self, from_db, last_doc_pk=None, limit=500):
        """
        :param from_db: The DB alias to query
        :param last_doc_pk: The primary key of the last doc from the previous batch
        :param limit: Desired batch size
        :return: Generator of DocIds namedtuple
        """
        query = self.query(from_db, last_doc_pk)
        field = self.id_field
        if isinstance(field, dict):
            query = query.annotate(**field)
            field = list(field)[0]
        query = query.values(self.primary_key_field_name, field)
        for row in query.order_by(self.primary_key_field_name)[:limit]:
            yield DocIds(row[field], row[self.primary_key_field_name])
def get_doc_ids ( self , from_db , last_doc_pk = None , limit = 500 ) : query = self . query ( from_db , last_doc_pk ) field = self . id_field if isinstance ( field , dict ) : query = query . annotate ( * * field ) field = list ( field ) [ 0 ] query = query . values ( self . primary_key_field_name , field ) for row in query . order_by ( self . primary_key_field_name ) [ : limit ] : yield DocIds ( row [ field ] , row [ self . primary_key_field_name ] )