* src/GrampsDb/_GrampsDbBase.py (transaction_commit): Remove
backend-specific call. * src/GrampsDb/_GrampsBSDDB.py (transaction_commit): Move surname list build to work for any batch transaction. * src/GrampsDb/_GrampsInMemDB.py (transaction_commit): Add method. svn: r7939
This commit is contained in:
parent
b1e9dfdafe
commit
832095aea5
@ -1,4 +1,9 @@
|
|||||||
2007-01-20 Alex Roitman <shura@gramps-project.org>
|
2007-01-20 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/GrampsDb/_GrampsDbBase.py (transaction_commit): Remove
|
||||||
|
backend-specific call.
|
||||||
|
* src/GrampsDb/_GrampsBSDDB.py (transaction_commit): Move surname
|
||||||
|
list build to work for any batch transaction.
|
||||||
|
* src/GrampsDb/_GrampsInMemDB.py (transaction_commit): Add method.
|
||||||
* src/Utils.py (profile): Accept and pass additional arguments.
|
* src/Utils.py (profile): Accept and pass additional arguments.
|
||||||
* src/DataViews/_PersonView.py (delete_person_response): Busy cursor.
|
* src/DataViews/_PersonView.py (delete_person_response): Busy cursor.
|
||||||
|
|
||||||
|
@ -1383,7 +1383,6 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
self.surnames.close()
|
self.surnames.close()
|
||||||
junk = db.DB(self.env)
|
junk = db.DB(self.env)
|
||||||
junk.remove(self.full_name,"surnames")
|
junk.remove(self.full_name,"surnames")
|
||||||
self.surnames = None
|
|
||||||
|
|
||||||
self.reference_map_referenced_map.close()
|
self.reference_map_referenced_map.close()
|
||||||
junk = db.DB(self.env)
|
junk = db.DB(self.env)
|
||||||
@ -1439,6 +1438,7 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
self.reference_map.associate(self.reference_map_referenced_map,
|
self.reference_map.associate(self.reference_map_referenced_map,
|
||||||
find_referenced_handle,open_flags)
|
find_referenced_handle,open_flags)
|
||||||
|
|
||||||
|
# Only build surname list after surname index is surely back
|
||||||
self.build_surname_list()
|
self.build_surname_list()
|
||||||
|
|
||||||
self.txn = None
|
self.txn = None
|
||||||
|
@ -1370,12 +1370,10 @@ class GrampsDbBase(GrampsDBCallback):
|
|||||||
if self.__LOG_ALL:
|
if self.__LOG_ALL:
|
||||||
log.debug("%s: Transaction commit '%s'\n"
|
log.debug("%s: Transaction commit '%s'\n"
|
||||||
% (self.__class__.__name__, str(msg)))
|
% (self.__class__.__name__, str(msg)))
|
||||||
if self.readonly:
|
|
||||||
return
|
if not len(transaction) or self.readonly:
|
||||||
if not len(transaction):
|
|
||||||
if self.surnames != None:
|
|
||||||
self.build_surname_list()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
transaction.set_description(msg)
|
transaction.set_description(msg)
|
||||||
transaction.timestamp = time.time()
|
transaction.timestamp = time.time()
|
||||||
self.undoindex += 1
|
self.undoindex += 1
|
||||||
|
@ -108,6 +108,11 @@ class GrampsInMemDB(GrampsDbBase):
|
|||||||
self.abort_possible = True
|
self.abort_possible = True
|
||||||
self.undo_history_timestamp = time.time()
|
self.undo_history_timestamp = time.time()
|
||||||
|
|
||||||
|
def transaction_commit(self,transaction,msg):
|
||||||
|
GrampsDbBase.transaction_commit(self,transaction,msg)
|
||||||
|
if transaction.batch:
|
||||||
|
self.build_surname_list()
|
||||||
|
|
||||||
def get_person_cursor(self):
|
def get_person_cursor(self):
|
||||||
return GrampsInMemCursor(self.person_map)
|
return GrampsInMemCursor(self.person_map)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user