Remove build_surname_list and save_surname_list from public API
This commit is contained in:
parent
efa910e5b9
commit
73d87e59e3
@ -1323,12 +1323,6 @@ class DbWriteBase(DbReadBase):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def build_surname_list(self):
|
|
||||||
"""
|
|
||||||
Build the list of locale-sorted surnames contained in the database.
|
|
||||||
"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def commit_event(self, event, transaction, change_time=None):
|
def commit_event(self, event, transaction, change_time=None):
|
||||||
"""
|
"""
|
||||||
Commit the specified Event to the database, storing the changes as
|
Commit the specified Event to the database, storing the changes as
|
||||||
|
@ -1655,7 +1655,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
|||||||
|
|
||||||
# Save misc items:
|
# Save misc items:
|
||||||
if self.has_changed:
|
if self.has_changed:
|
||||||
self.save_surname_list()
|
|
||||||
self.save_gender_stats(self.genderStats)
|
self.save_gender_stats(self.genderStats)
|
||||||
|
|
||||||
# Indexes:
|
# Indexes:
|
||||||
|
@ -183,7 +183,6 @@ class DbTest(unittest.TestCase):
|
|||||||
"add_source",
|
"add_source",
|
||||||
"add_tag",
|
"add_tag",
|
||||||
"add_to_surname_list",
|
"add_to_surname_list",
|
||||||
"build_surname_list",
|
|
||||||
"commit_event",
|
"commit_event",
|
||||||
"commit_family",
|
"commit_family",
|
||||||
"commit_media",
|
"commit_media",
|
||||||
|
@ -1836,7 +1836,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
self.emit('person-groupname-rebuild', (name, grouppar))
|
self.emit('person-groupname-rebuild', (name, grouppar))
|
||||||
|
|
||||||
@catch_db_error
|
@catch_db_error
|
||||||
def build_surname_list(self):
|
def __build_surname_list(self):
|
||||||
"""
|
"""
|
||||||
Build surname list for use in autocompletion
|
Build surname list for use in autocompletion
|
||||||
This is a list of unicode objects, which are decoded from the utf-8 in
|
This is a list of unicode objects, which are decoded from the utf-8 in
|
||||||
@ -2317,7 +2317,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
find_referenced_handle, DBFLAGS_O)
|
find_referenced_handle, DBFLAGS_O)
|
||||||
|
|
||||||
# Only build surname list after surname index is surely back
|
# Only build surname list after surname index is surely back
|
||||||
self.build_surname_list()
|
self.__build_surname_list()
|
||||||
|
|
||||||
# Reset callbacks if necessary
|
# Reset callbacks if necessary
|
||||||
if transaction.batch or not len(transaction):
|
if transaction.batch or not len(transaction):
|
||||||
|
@ -365,7 +365,6 @@ class DBAPI(DbGeneric):
|
|||||||
TXNDEL: "-delete",
|
TXNDEL: "-delete",
|
||||||
None: "-delete"}
|
None: "-delete"}
|
||||||
if txn.batch:
|
if txn.batch:
|
||||||
self.build_surname_list()
|
|
||||||
# FIXME: need a User GUI update callback here:
|
# FIXME: need a User GUI update callback here:
|
||||||
self.reindex_reference_map(lambda percent: percent)
|
self.reindex_reference_map(lambda percent: percent)
|
||||||
self.dbapi.commit()
|
self.dbapi.commit()
|
||||||
@ -1796,20 +1795,6 @@ class DBAPI(DbGeneric):
|
|||||||
surname_list.append(row[0])
|
surname_list.append(row[0])
|
||||||
return surname_list
|
return surname_list
|
||||||
|
|
||||||
def save_surname_list(self):
|
|
||||||
"""
|
|
||||||
Save the surname_list into persistant storage.
|
|
||||||
"""
|
|
||||||
# Nothing for DB-API to do; saves in person table
|
|
||||||
pass
|
|
||||||
|
|
||||||
def build_surname_list(self):
|
|
||||||
"""
|
|
||||||
Rebuild the surname_list.
|
|
||||||
"""
|
|
||||||
# Nothing for DB-API to do; saves in person table
|
|
||||||
pass
|
|
||||||
|
|
||||||
def drop_tables(self):
|
def drop_tables(self):
|
||||||
"""
|
"""
|
||||||
Useful in testing, reseting. If the test is unsure whether the tables
|
Useful in testing, reseting. If the test is unsure whether the tables
|
||||||
|
Loading…
Reference in New Issue
Block a user