def queryMore(self, queryLocator): locator = queryLocator res = BaseClient.queryMore(self, locator) # calculate the union of the sets of record types from each record types = reduce(lambda a,b: a|b, [getRecordTypes(r) for r in res[_tPartnerNS.records:]], set()) new_types = types - set(self.typeDescs.keys()) if new_types: self.typeDescs.update(self.queryTypesDescriptions(new_types)) data = QueryRecordSet(records=[self._extractRecord(r) for r in res[_tPartnerNS.records:]], done=_bool(res[_tPartnerNS.done]), size=int(str(res[_tPartnerNS.size])), queryLocator = str(res[_tPartnerNS.queryLocator])) return data
def queryMore(self, queryLocator): locator = queryLocator.locator #sObjectType = queryLocator.sObjectType #fields = queryLocator.fields res = BaseClient.queryMore(self, locator) locator = QueryLocator( str(res[_tPartnerNS.queryLocator]) ) data = dict(queryLocator = locator, done = _bool(res[_tPartnerNS.done]), records = [_extractRecord( r ) for r in res[_tPartnerNS.records:]], size = int(str(res[_tPartnerNS.size])) ) return data