9547: Remove unused database methods
This commit is contained in:
parent
c7c674b8c9
commit
7053678526
@ -700,12 +700,6 @@ class DbReadBase:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_reference_map_cursor(self):
|
||||
"""
|
||||
Returns a reference to a cursor over the reference map
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_reference_map_primary_cursor(self):
|
||||
"""
|
||||
Returns a reference to a cursor over the reference map primary map
|
||||
@ -1226,16 +1220,6 @@ class DbReadBase:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def set_redo_callback(self, callback):
|
||||
"""
|
||||
Define the callback function that is called whenever an redo operation
|
||||
is executed.
|
||||
|
||||
The callback function receives a single argument that is a text string
|
||||
that defines the operation.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def set_researcher(self, owner):
|
||||
"""
|
||||
Set the information about the owner of the database.
|
||||
@ -1248,16 +1232,6 @@ class DbReadBase:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def set_undo_callback(self, callback):
|
||||
"""
|
||||
Define the callback function that is called whenever an undo operation
|
||||
is executed.
|
||||
|
||||
The callback function receives a single argument that is a text string
|
||||
that defines the operation.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_dbid(self):
|
||||
"""
|
||||
A unique ID for this database on this computer.
|
||||
@ -1777,12 +1751,6 @@ class DbWriteBase(DbReadBase):
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def sort_surname_list(self):
|
||||
"""
|
||||
Sort the list of surnames contained in the database by locale ordering.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def transaction_begin(self, transaction):
|
||||
"""
|
||||
Prepare the database for the start of a new transaction.
|
||||
|
@ -1488,26 +1488,6 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
self.note_prefix = self._validated_id_prefix(val, "N")
|
||||
self.nid2user_format = self.__id2user_format(self.note_prefix)
|
||||
|
||||
def set_undo_callback(self, callback):
|
||||
"""
|
||||
Define the callback function that is called whenever an undo operation
|
||||
is executed.
|
||||
|
||||
The callback function receives a single argument that is a text string
|
||||
that defines the operation.
|
||||
"""
|
||||
self.undo_callback = callback
|
||||
|
||||
def set_redo_callback(self, callback):
|
||||
"""
|
||||
Define the callback function that is called whenever an redo operation
|
||||
is executed.
|
||||
|
||||
The callback function receives a single argument that is a text string
|
||||
that defines the operation.
|
||||
"""
|
||||
self.redo_callback = callback
|
||||
|
||||
def get_surname_list(self):
|
||||
"""
|
||||
Return the list of locale-sorted surnames contained in the database.
|
||||
|
@ -104,7 +104,6 @@ class DbTest(unittest.TestCase):
|
||||
"get_raw_repository_data",
|
||||
"get_raw_source_data",
|
||||
"get_raw_tag_data",
|
||||
"get_reference_map_cursor",
|
||||
"get_reference_map_primary_cursor",
|
||||
"get_reference_map_referenced_cursor",
|
||||
"get_repo_bookmarks",
|
||||
@ -173,10 +172,8 @@ class DbTest(unittest.TestCase):
|
||||
"set_source_id_prefix",
|
||||
# Other set methods:
|
||||
"set_mediapath",
|
||||
"set_redo_callback",
|
||||
"set_researcher",
|
||||
"set_save_path",
|
||||
"set_undo_callback",
|
||||
"version_supported",
|
||||
]
|
||||
|
||||
@ -219,7 +216,6 @@ class DbTest(unittest.TestCase):
|
||||
"set_auto_remove",
|
||||
"set_default_person_handle",
|
||||
"set_name_group_mapping",
|
||||
"sort_surname_list",
|
||||
"transaction_begin",
|
||||
"transaction_commit",
|
||||
"update_reference_map",
|
||||
|
@ -485,13 +485,6 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
# the referenced_handle index: the referenced_handle
|
||||
# the main index is unique, the others allow duplicate entries.
|
||||
|
||||
@catch_db_error
|
||||
def get_reference_map_cursor(self):
|
||||
"""
|
||||
Returns a reference to a cursor over the reference map
|
||||
"""
|
||||
return DbBsddbAssocCursor(self.reference_map, self.txn)
|
||||
|
||||
@catch_db_error
|
||||
def get_reference_map_primary_cursor(self):
|
||||
"""
|
||||
@ -1844,9 +1837,6 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
grouppar = group
|
||||
self.emit('person-groupname-rebuild', (name, grouppar))
|
||||
|
||||
def sort_surname_list(self):
|
||||
self.surname_list.sort(key=glocale.sort_key)
|
||||
|
||||
@catch_db_error
|
||||
def build_surname_list(self):
|
||||
"""
|
||||
|
@ -1008,14 +1008,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
|
||||
LOG.warn("handle %s does not exist in the dummy database" % handle)
|
||||
raise HandleError('Handle %s not found' % handle.decode('utf-8'))
|
||||
|
||||
def get_reference_map_cursor(self):
|
||||
"""
|
||||
Returns a reference to a cursor over the reference map
|
||||
"""
|
||||
if not self.db_is_open:
|
||||
LOG.warn("database is closed")
|
||||
return []
|
||||
|
||||
def get_reference_map_primary_cursor(self):
|
||||
"""
|
||||
Returns a reference to a cursor over the reference map primary map
|
||||
@ -1666,17 +1658,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
|
||||
if not self.db_is_open:
|
||||
LOG.warn("database is closed")
|
||||
|
||||
def set_redo_callback(self, callback):
|
||||
"""
|
||||
Define the callback function that is called whenever an redo operation
|
||||
is executed.
|
||||
|
||||
The callback function receives a single argument that is a text string
|
||||
that defines the operation.
|
||||
"""
|
||||
if not self.db_is_open:
|
||||
LOG.warn("database is closed")
|
||||
|
||||
def set_researcher(self, owner):
|
||||
"""
|
||||
Set the information about the owner of the database.
|
||||
@ -1691,17 +1672,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
|
||||
if not self.db_is_open:
|
||||
LOG.warn("database is closed")
|
||||
|
||||
def set_undo_callback(self, callback):
|
||||
"""
|
||||
Define the callback function that is called whenever an undo operation
|
||||
is executed.
|
||||
|
||||
The callback function receives a single argument that is a text string
|
||||
that defines the operation.
|
||||
"""
|
||||
if not self.db_is_open:
|
||||
LOG.warn("database is closed")
|
||||
|
||||
def get_dbid(self):
|
||||
"""
|
||||
A unique ID for this database on this computer.
|
||||
|
Loading…
Reference in New Issue
Block a user