Latest updates to new modules
svn: r13101
This commit is contained in:
parent
74b308773e
commit
ae404f496f
@ -595,9 +595,11 @@ class GrampsDbRead(GrampsDbBase, Callback):
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
def get_number_of_records(table):
|
||||
return len(table)
|
||||
def get_number_of_records(self, table):
|
||||
if self.txn is None:
|
||||
return len(table)
|
||||
else:
|
||||
return table.stat(flags=db.DB_FAST_STAT, txn=self.txn)['nkeys']
|
||||
|
||||
def get_number_of_people(self):
|
||||
"""
|
||||
@ -1453,6 +1455,10 @@ class GrampsDbRead(GrampsDbBase, Callback):
|
||||
"""
|
||||
default = [(1, 0, 200), (1, 1, 75), (1, 2, 100), (1, 3, 150),
|
||||
(1, 4, 200), (0, 5, 100)]
|
||||
# Benny's new column order
|
||||
default = [(1, 0, 200), (1, 1, 75), (1, 2, 100),
|
||||
(0, 6, 230), (1, 3, 150),
|
||||
(1, 4, 200), (0, 5, 100)]
|
||||
return self.__get_columns(EVENT_COL_KEY, default)
|
||||
|
||||
def get_repository_column_order(self):
|
||||
|
@ -1387,13 +1387,6 @@ class GrampsDBDir(GrampsDbRead, Callback, UpdateCallback):
|
||||
transaction.add(key, op, handle, old_data, new_data)
|
||||
return old_data
|
||||
|
||||
def do_commit(self, add_list, db_map):
|
||||
retlist = []
|
||||
for (handle, data) in add_list:
|
||||
db_map.put(handle, data, self.txn)
|
||||
retlist.append(str(handle))
|
||||
return retlist
|
||||
|
||||
def commit_person(self, person, transaction, change_time=None):
|
||||
"""
|
||||
Commit the specified Person to the database, storing the changes as
|
||||
|
Loading…
Reference in New Issue
Block a user