示例#1
0
 def remove(self, doc):
     """Removes the document from the doc dict.
     """
     doc_id = doc[self.unique_key]
     try:
         del self.doc_dict[doc_id]
     except KeyError:
         raise OperationFailed("Document does not exist: %s" % str(doc))
 def remove(self, document_id, namespace, timestamp):
     """Removes the document from the doc dict.
     """
     try:
         entry = self.doc_dict[document_id]
         entry.doc = None
         entry.update(namespace, timestamp)
     except KeyError:
         raise OperationFailed("Document does not exist: %s" % document_id)
示例#3
0
 def remove(self, doc):
     """Removes the document from the doc dict.
     """
     doc_id = doc["_id"]
     try:
         del self.doc_dict[doc_id]
         self.removed_dict[doc_id] = {
             '_id': doc_id,
             'ns': doc['ns'],
             '_ts': doc['_ts']
         }
     except KeyError:
         raise OperationFailed("Document does not exist: %s" % str(doc))