def __init__(self, source, query, values, room, count=None): Peer.__init__(self, room) QueryResult.__init__(self, source, query) from documentChanger import DocumentChanger DocumentChanger.reregisterToken(room + "NextOrder", self.nextOrderToken) self._values = values from uuid import uuid4 self._ident = uuid4().hex self._count = count self._limit = -1 self._serial = unicode(ValueQueryResult.SERIAL) self._orderPath = None ValueQueryResult.SERIAL += 1 if query != None: limit = query.get('args.limit') if limit != None: self._limit = int(limit) self._catch(ValueQueryResult.In.RequestedDocument, self._requestedDocument) self._defers = {} self._deferredDocs = {}
def __init__(self, source, query, ids, room, count=None): Peer.__init__(self, room) QueryResult.__init__(self, source, query) self._ids = ids self._count = count self._catch(DocumentIDQueryResult.In.RequestedDocument, self._requestedDocument) self._defers = {} self._deferredDocs = {} self._orderPath = None