1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- #$Id: back_bsddb.py,v 1.18 2002-05-15 06:21:21 richard Exp $
18+ #$Id: back_bsddb.py,v 1.18.2.1 2002-09-03 06:35:16 richard Exp $
1919'''
2020This module defines a backend that saves the hyperdatabase in BSDDB.
2121'''
@@ -49,7 +49,7 @@ def getclassdb(self, classname, mode='r'):
4949 if os .path .exists (path ):
5050 return bsddb .btopen (path , mode )
5151 else :
52- return bsddb .btopen (path , 'n ' )
52+ return bsddb .btopen (path , 'c ' )
5353
5454 def _opendb (self , name , mode ):
5555 '''Low-level database opener that gets around anydbm/dbm
@@ -61,8 +61,8 @@ def _opendb(self, name, mode):
6161 path = os .path .join (os .getcwd (), self .dir , name )
6262 if not os .path .exists (path ):
6363 if __debug__ :
64- print >> hyperdb .DEBUG , "_opendb bsddb.open(%r, 'n ')" % path
65- return bsddb .btopen (path , 'n ' )
64+ print >> hyperdb .DEBUG , "_opendb bsddb.open(%r, 'c ')" % path
65+ return bsddb .btopen (path , 'c ' )
6666
6767 # open the database with the correct module
6868 if __debug__ :
@@ -119,6 +119,14 @@ def _doSaveJournal(self, classname, nodeid, action, params):
119119
120120#
121121#$Log: not supported by cvs2svn $
122+ #Revision 1.18 2002/05/15 06:21:21 richard
123+ # . node caching now works, and gives a small boost in performance
124+ #
125+ #As a part of this, I cleaned up the DEBUG output and implemented TRACE
126+ #output (HYPERDBTRACE='file to trace to') with checkpoints at the start of
127+ #CGI requests. Run roundup with python -O to skip all the DEBUG/TRACE stuff
128+ #(using if __debug__ which is compiled out with -O)
129+ #
122130#Revision 1.17 2002/04/03 05:54:31 richard
123131#Fixed serialisation problem by moving the serialisation step out of the
124132#hyperdb.Class (get, set) into the hyperdb.Database.
0 commit comments