Package gen :: Package utils :: Module dbutils
[frames] | no frames]

Module dbutils

source code

Functions
 
delete_person_from_database(db, person, trans)
Deletes a person from the database, cleaning up all associated references.
source code
 
remove_family_relationships(db, family_handle, trans=None) source code
 
remove_parent_from_family(db, person_handle, family_handle, trans=None)
Remove a person as either the father or mother of a family, deleting the family if it becomes empty.
source code
 
remove_child_from_family(db, person_handle, family_handle, trans=None)
Remove a person as a child of the family, deleting the family if it becomes empty.
source code
 
marriage_from_eventref_list(db, eventref_list) source code
 
add_child_to_family(db, family, child, mrel=gen.lib.ChildRefType(), frel=gen.lib.ChildRefType(), trans=None) source code
 
get_total(db) source code
 
db_copy(from_db, to_db, callback)
Copy all data in from_db into to_db.
source code
 
set_birth_death_index(db, person) source code

Imports: _, copy, gen, UpdateCallback


Function Details

db_copy(from_db, to_db, callback)

source code 

Copy all data in from_db into to_db.

Both databases must be loaded. It is assumed that to_db is an empty database, so no care is taken to prevent handle collision or merge data.