From 196b99b83354af20844f6be5f82cd2794aa9ec50 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 6 Jan 2006 21:18:50 +0000 Subject: [PATCH] Update svn: r5684 --- src/GrampsDb/_GrampsBSDDB.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/GrampsDb/_GrampsBSDDB.py b/src/GrampsDb/_GrampsBSDDB.py index 468186ce1..f866cb0ed 100644 --- a/src/GrampsDb/_GrampsBSDDB.py +++ b/src/GrampsDb/_GrampsBSDDB.py @@ -850,10 +850,22 @@ class GrampsBSDDB(GrampsDbBase): add_func(obj,transaction) return obj - def transaction_commit(self,transaction,msg): + def transaction_begin(self,msg=""): + """ + Creates a new Transaction tied to the current UNDO database. The + transaction has no effect until it is committed using the + transaction_commit function of the this database object. + """ + if self.__LOG_ALL: + log.debug("%s: Transaction begin '%s'\n" + % (self.__class__.__name__, str(msg))) # Start BSD DB transaction -- DBTxn self.txn = self.env.txn_begin() + return Transaction(msg,self.undodb) + + def transaction_commit(self,transaction,msg): + GrampsDbBase.transaction_commit(self,transaction,msg) # Commit BSD DB transaction -- DBTxn