/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/changecache.py

  • Committer: Michael Hudson
  • Date: 2007-08-24 17:27:18 UTC
  • mto: This revision was merged to the branch mainline in revision 138.
  • Revision ID: michael.hudson@canonical.com-20070824172718-bz501mx0k8ypnrbl
use my sqlite not-shelf for the textindex too.  very very slow to fill, but no more bdb!

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
            filechange = RevisionData(revid, cPickle.dumps(obj, protocol=2))
73
73
            self.store.add(filechange)
74
74
        self.store.commit()
 
75
    def update(self, revid_obj_pairs):
 
76
        for revid, obj in revid_obj_pairs:
 
77
            filechange = self.store.get(RevisionData, revid)
 
78
            filechange.data = cPickle.dumps(obj, protocol=2)
 
79
        self.store.commit()
75
80
    def count(self):
76
81
        return self.store.find(RevisionData).count()
 
82
    def close(self):
 
83
        self.store.close()
77
84
 
78
85
class ChangeCache (object):
79
86