~jameinel/u1db/get-all-docs

« back to all changes in this revision

Viewing changes to u1db/backends/inmemory.py

  • Committer: John Arbash Meinel
  • Date: 2011-11-15 13:54:37 UTC
  • mfrom: (94.1.13 u1db)
  • Revision ID: john@arbash-meinel.com-20111115135437-6djwef6kq2hsf7p9
Merge trunk to get all the new goodness.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        self._replica_uid = replica_uid
34
34
        self._last_exchange_log = None
35
35
 
 
36
    def close(self):
 
37
        # This is a no-op, We don't want to free the data because one client
 
38
        # may be closing it, while another wants to inspect the results.
 
39
        pass
 
40
 
36
41
    def get_sync_generation(self, other_replica_uid):
37
42
        return self._other_generations.get(other_replica_uid, 0)
38
43
 
199
204
    def remove_json(self, doc_id, doc):
200
205
        """Remove this json doc from the index."""
201
206
        key = self.evaluate_json(doc)
 
207
        if key is None:
 
208
            return
202
209
        doc_ids = self._values[key]
203
210
        doc_ids.remove(doc_id)
204
211
        if not doc_ids: