Package gen :: Package proxy :: Module proxybase :: Class ProxyDbBase
[frames] | no frames]

Class ProxyDbBase

source code


A proxy to a Gramps database. This proxy will act like a Gramps database, but all data marked private will be hidden from the user.

Instance Methods
 
__init__(self, db)
Create a new PrivateProxyDb instance.
source code
 
is_open(self)
Return 1 if the database has been opened.
source code
 
get_name_group_mapping(self, name)
Return the default grouping name for a surname
source code
 
has_name_group_key(self, name)
Return if a key exists in the name_group table
source code
 
get_name_group_keys(self)
Return the defined names that have been assigned to a default grouping
source code
 
get_number_of_people(self)
Return the number of people currently in the databse.
source code
 
get_number_of_families(self)
Return the number of families currently in the databse.
source code
 
get_number_of_events(self)
Return the number of events currently in the databse.
source code
 
get_number_of_places(self)
Return the number of places currently in the databse.
source code
 
get_number_of_sources(self)
Return the number of sources currently in the databse.
source code
 
get_number_of_media_objects(self)
Return the number of media objects currently in the databse.
source code
 
get_number_of_repositories(self)
Return the number of source repositories currently in the databse.
source code
 
get_number_of_notes(self)
Return the number of notes currently in the databse.
source code
 
get_save_path(self)
returns the save path of the file, or "" if one does not exist
source code
 
get_person_event_types(self)
returns a list of all Event types assocated with Person instances in the database
source code
 
get_person_attribute_types(self)
returns a list of all Attribute types assocated with Person instances in the database
source code
 
get_family_attribute_types(self)
returns a list of all Attribute types assocated with Family instances in the database
source code
 
get_family_event_types(self)
returns a list of all Event types assocated with Family instances in the database
source code
 
get_marker_types(self)
return a list of all marker types available in the database
source code
 
get_media_attribute_types(self)
returns a list of all Attribute types assocated with Media and MediaRef instances in the database
source code
 
get_family_relation_types(self)
returns a list of all relationship types assocated with Family instances in the database
source code
 
get_child_reference_types(self)
returns a list of all child reference types assocated with Family instances in the database
source code
 
get_event_roles(self)
returns a list of all custom event role names assocated with Event instances in the database
source code
 
get_name_types(self)
returns a list of all custom names types assocated with Person instances in the database
source code
 
get_repository_types(self)
returns a list of all custom repository types assocated with Repository instances in the database
source code
 
get_note_types(self)
returns a list of all custom note types assocated with Note instances in the database
source code
 
get_source_media_types(self)
returns a list of all custom source media types assocated with Source instances in the database
source code
 
get_url_types(self)
returns a list of all custom names types assocated with Url instances in the database
source code
 
get_raw_person_data(self, handle) source code
 
get_raw_family_data(self, handle) source code
 
get_raw_object_data(self, handle) source code
 
get_raw_place_data(self, handle) source code
 
get_raw_event_data(self, handle) source code
 
get_raw_source_data(self, handle) source code
 
get_raw_repository_data(self, handle) source code
 
get_raw_note_data(self, handle) source code
 
has_person_handle(self, handle)
returns True if the handle exists in the current Person database.
source code
 
has_event_handle(self, handle)
returns True if the handle exists in the current Event database.
source code
 
has_source_handle(self, handle)
returns True if the handle exists in the current Source database.
source code
 
has_place_handle(self, handle)
returns True if the handle exists in the current Place database.
source code
 
has_family_handle(self, handle)
returns True if the handle exists in the current Family database.
source code
 
has_object_handle(self, handle)
returns True if the handle exists in the current MediaObjectdatabase.
source code
 
has_repository_handle(self, handle)
returns True if the handle exists in the current Repository database.
source code
 
has_note_handle(self, handle)
returns True if the handle exists in the current Note database.
source code
 
get_mediapath(self)
returns the default media path of the database
source code
 
set_column_order(self, col_list, name) source code
 
set_person_column_order(self, col_list)
Stores the Person display common information in the database's metadata.
source code
 
set_family_list_column_order(self, col_list)
Stores the Person display common information in the database's metadata.
source code
 
set_child_column_order(self, col_list)
Stores the Person display common information in the database's metadata.
source code
 
set_place_column_order(self, col_list)
Stores the Place display common information in the database's metadata.
source code
 
set_source_column_order(self, col_list)
Stores the Source display common information in the database's metadata.
source code
 
set_media_column_order(self, col_list)
Stores the Media display common information in the database's metadata.
source code
 
set_event_column_order(self, col_list)
Stores the Event display common information in the database's metadata.
source code
 
set_repository_column_order(self, col_list)
Stores the Repository display common information in the database's metadata.
source code
 
set_note_column_order(self, col_list)
Stores the Note display common information in the database's metadata.
source code
 
get_person_column_order(self)
Return the Person display common information stored in the database's metadata.
source code
 
get_family_list_column_order(self)
Return the Person display common information stored in the database's metadata.
source code
 
get_child_column_order(self)
Return the Person display common information stored in the database's metadata.
source code
 
get_place_column_order(self)
Return the Place display common information stored in the database's metadata.
source code
 
get_source_column_order(self)
Return the Source display common information stored in the database's metadata.
source code
 
get_media_column_order(self)
Return the MediaObject display common information stored in the database's metadata.
source code
 
get_event_column_order(self)
Return the Event display common information stored in the database's metadata.
source code
 
get_repository_column_order(self)
Return the Repository display common information stored in the database's metadata.
source code
 
get_note_column_order(self)
Return the Note display common information stored in the database's metadata.
source code
 
delete_primary_from_reference_map(self, handle, transaction)
Called each time an object is removed from the database.
source code
 
update_reference_map(self, obj, transaction)
Called each time an object is writen to the database.
source code
 
reindex_reference_map(self, callback)
Reindex all primary records in the database.
source code
 
find_backlink_handles(self, handle, include_classes=None)
Find all objects that hold a reference to the object handle.
source code
 
get_gramps_ids(self, obj_key) source code
 
has_gramps_id(self, obj_key, gramps_id) source code
 
get_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_family_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_event_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_place_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_source_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_media_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_repo_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_note_bookmarks(self)
returns the list of Note handles in the bookmarks
source code

Inherited from dbbase.DbBase: add_event, add_family, add_family_event, add_note, add_object, add_person, add_person_event, add_place, add_repository, add_source, add_to_surname_list, build_surname_list, check_event_from_handle, check_family_from_handle, check_note_from_handle, check_object_from_handle, check_person_from_handle, check_place_from_handle, check_repository_from_handle, check_source_from_handle, close, close_undodb, commit_base, commit_event, commit_family, commit_family_event, commit_media_object, commit_note, commit_person, commit_personal_event, commit_place, commit_repository, commit_source, create_id, del_event, del_family, del_media, del_note, del_person, del_place, del_repository, del_source, do_commit, find_event_from_handle, find_family_from_handle, find_initial_person, find_next_event_gramps_id, find_next_family_gramps_id, find_next_note_gramps_id, find_next_object_gramps_id, find_next_person_gramps_id, find_next_place_gramps_id, find_next_repository_gramps_id, find_next_source_gramps_id, find_note_from_handle, find_object_from_handle, find_person_from_handle, find_place_from_handle, find_repository_from_handle, find_source_from_handle, get_default_handle, get_default_person, get_event_cursor, get_event_cursor_iter, get_event_from_gramps_id, get_event_from_handle, get_event_handles, get_family_cursor, get_family_cursor_iter, get_family_from_gramps_id, get_family_from_handle, get_family_handles, get_media_cursor, get_media_cursor_iter, get_media_object_handles, get_note_cursor, get_note_cursor_iter, get_note_from_gramps_id, get_note_from_handle, get_note_handles, get_object_from_gramps_id, get_object_from_handle, get_person_cursor, get_person_cursor_iter, get_person_from_gramps_id, get_person_from_handle, get_person_handles, get_place_cursor, get_place_cursor_iter, get_place_from_gramps_id, get_place_from_handle, get_place_handles, get_repository_cursor, get_repository_cursor_iter, get_repository_from_gramps_id, get_repository_from_handle, get_repository_handles, get_researcher, get_source_cursor, get_source_cursor_iter, get_source_from_gramps_id, get_source_from_handle, get_source_handles, get_surname_list, gramps_upgrade, load, load_from, need_upgrade, open_undodb, rebuild_secondary, redo, redo_available, remove_event, remove_family, remove_from_surname_list, remove_note, remove_object, remove_person, remove_place, remove_repository, remove_source, request_rebuild, set_default_person_handle, set_event_id_prefix, set_family_id_prefix, set_mediapath, set_name_group_mapping, set_note_id_prefix, set_object_id_prefix, set_person_id_prefix, set_place_id_prefix, set_prefixes, set_redo_callback, set_repository_id_prefix, set_researcher, set_save_path, set_source_id_prefix, set_undo_callback, transaction_begin, transaction_commit, undo, undo_available, undo_reference, version_supported

Method Details

is_open(self)

source code 

Return 1 if the database has been opened.

Overrides: dbbase.DbBase.is_open

get_name_group_mapping(self, name)

source code 

Return the default grouping name for a surname

Overrides: dbbase.DbBase.get_name_group_mapping

has_name_group_key(self, name)

source code 

Return if a key exists in the name_group table

Overrides: dbbase.DbBase.has_name_group_key

get_name_group_keys(self)

source code 

Return the defined names that have been assigned to a default grouping

Overrides: dbbase.DbBase.get_name_group_keys

get_number_of_people(self)

source code 

Return the number of people currently in the databse.

Overrides: dbbase.DbBase.get_number_of_people

get_number_of_families(self)

source code 

Return the number of families currently in the databse.

Overrides: dbbase.DbBase.get_number_of_families

get_number_of_events(self)

source code 

Return the number of events currently in the databse.

Overrides: dbbase.DbBase.get_number_of_events

get_number_of_places(self)

source code 

Return the number of places currently in the databse.

Overrides: dbbase.DbBase.get_number_of_places

get_number_of_sources(self)

source code 

Return the number of sources currently in the databse.

Overrides: dbbase.DbBase.get_number_of_sources

get_number_of_media_objects(self)

source code 

Return the number of media objects currently in the databse.

Overrides: dbbase.DbBase.get_number_of_media_objects

get_number_of_repositories(self)

source code 

Return the number of source repositories currently in the databse.

Overrides: dbbase.DbBase.get_number_of_repositories

get_number_of_notes(self)

source code 

Return the number of notes currently in the databse.

Overrides: dbbase.DbBase.get_number_of_notes

get_save_path(self)

source code 

returns the save path of the file, or "" if one does not exist

Overrides: dbbase.DbBase.get_save_path

get_person_event_types(self)

source code 

returns a list of all Event types assocated with Person instances in the database

Overrides: dbbase.DbBase.get_person_event_types

get_person_attribute_types(self)

source code 

returns a list of all Attribute types assocated with Person instances in the database

Overrides: dbbase.DbBase.get_person_attribute_types

get_family_attribute_types(self)

source code 

returns a list of all Attribute types assocated with Family instances in the database

Overrides: dbbase.DbBase.get_family_attribute_types

get_family_event_types(self)

source code 

returns a list of all Event types assocated with Family instances in the database

Overrides: dbbase.DbBase.get_family_event_types

get_marker_types(self)

source code 

return a list of all marker types available in the database

Overrides: dbbase.DbBase.get_marker_types

get_media_attribute_types(self)

source code 

returns a list of all Attribute types assocated with Media and MediaRef instances in the database

Overrides: dbbase.DbBase.get_media_attribute_types

get_family_relation_types(self)

source code 

returns a list of all relationship types assocated with Family instances in the database

Overrides: dbbase.DbBase.get_family_relation_types

get_child_reference_types(self)

source code 

returns a list of all child reference types assocated with Family instances in the database

Overrides: dbbase.DbBase.get_child_reference_types

get_event_roles(self)

source code 

returns a list of all custom event role names assocated with Event instances in the database

Overrides: dbbase.DbBase.get_event_roles

get_name_types(self)

source code 

returns a list of all custom names types assocated with Person instances in the database

Overrides: dbbase.DbBase.get_name_types

get_repository_types(self)

source code 

returns a list of all custom repository types assocated with Repository instances in the database

Overrides: dbbase.DbBase.get_repository_types

get_note_types(self)

source code 

returns a list of all custom note types assocated with Note instances in the database

Overrides: dbbase.DbBase.get_note_types

get_source_media_types(self)

source code 

returns a list of all custom source media types assocated with Source instances in the database

Overrides: dbbase.DbBase.get_source_media_types

get_url_types(self)

source code 

returns a list of all custom names types assocated with Url instances in the database

Overrides: dbbase.DbBase.get_url_types

get_raw_person_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_person_data

get_raw_family_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_family_data

get_raw_object_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_object_data

get_raw_place_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_place_data

get_raw_event_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_event_data

get_raw_source_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_source_data

get_raw_repository_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_repository_data

get_raw_note_data(self, handle)

source code 
Overrides: dbbase.DbBase.get_raw_note_data

has_person_handle(self, handle)

source code 

returns True if the handle exists in the current Person database.

Overrides: dbbase.DbBase.has_person_handle

has_event_handle(self, handle)

source code 

returns True if the handle exists in the current Event database.

Overrides: dbbase.DbBase.has_event_handle

has_source_handle(self, handle)

source code 

returns True if the handle exists in the current Source database.

Overrides: dbbase.DbBase.has_source_handle

has_place_handle(self, handle)

source code 

returns True if the handle exists in the current Place database.

Overrides: dbbase.DbBase.has_place_handle

has_family_handle(self, handle)

source code 

returns True if the handle exists in the current Family database.

Overrides: dbbase.DbBase.has_family_handle

has_object_handle(self, handle)

source code 

returns True if the handle exists in the current MediaObjectdatabase.

Overrides: dbbase.DbBase.has_object_handle

has_repository_handle(self, handle)

source code 

returns True if the handle exists in the current Repository database.

Overrides: dbbase.DbBase.has_repository_handle

has_note_handle(self, handle)

source code 

returns True if the handle exists in the current Note database.

Overrides: dbbase.DbBase.has_note_handle

get_mediapath(self)

source code 

returns the default media path of the database

Overrides: dbbase.DbBase.get_mediapath

set_column_order(self, col_list, name)

source code 
Overrides: dbbase.DbBase.set_column_order

set_person_column_order(self, col_list)

source code 

Stores the Person display common information in the database's metadata.

Overrides: dbbase.DbBase.set_person_column_order

set_family_list_column_order(self, col_list)

source code 

Stores the Person display common information in the database's metadata.

Overrides: dbbase.DbBase.set_family_list_column_order

set_child_column_order(self, col_list)

source code 

Stores the Person display common information in the database's metadata.

Overrides: dbbase.DbBase.set_child_column_order

set_place_column_order(self, col_list)

source code 

Stores the Place display common information in the database's metadata.

Overrides: dbbase.DbBase.set_place_column_order

set_source_column_order(self, col_list)

source code 

Stores the Source display common information in the database's metadata.

Overrides: dbbase.DbBase.set_source_column_order

set_media_column_order(self, col_list)

source code 

Stores the Media display common information in the database's metadata.

Overrides: dbbase.DbBase.set_media_column_order

set_event_column_order(self, col_list)

source code 

Stores the Event display common information in the database's metadata.

Overrides: dbbase.DbBase.set_event_column_order

set_repository_column_order(self, col_list)

source code 

Stores the Repository display common information in the database's metadata.

Overrides: dbbase.DbBase.set_repository_column_order

set_note_column_order(self, col_list)

source code 

Stores the Note display common information in the database's metadata.

Overrides: dbbase.DbBase.set_note_column_order

get_person_column_order(self)

source code 

Return the Person display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_person_column_order

get_family_list_column_order(self)

source code 

Return the Person display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_family_list_column_order

get_child_column_order(self)

source code 

Return the Person display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_child_column_order

get_place_column_order(self)

source code 

Return the Place display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_place_column_order

get_source_column_order(self)

source code 

Return the Source display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_source_column_order

get_media_column_order(self)

source code 

Return the MediaObject display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_media_column_order

get_event_column_order(self)

source code 

Return the Event display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_event_column_order

get_repository_column_order(self)

source code 

Return the Repository display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_repository_column_order

get_note_column_order(self)

source code 

Return the Note display common information stored in the database's metadata.

Overrides: dbbase.DbBase.get_note_column_order

delete_primary_from_reference_map(self, handle, transaction)

source code 

Called each time an object is removed from the database. This can be used by subclasses to update any additional index tables that might need to be changed.

Overrides: dbbase.DbBase.delete_primary_from_reference_map

update_reference_map(self, obj, transaction)

source code 

Called each time an object is writen to the database. This can be used by subclasses to update any additional index tables that might need to be changed.

Overrides: dbbase.DbBase.update_reference_map

reindex_reference_map(self, callback)

source code 

Reindex all primary records in the database.

Overrides: dbbase.DbBase.reindex_reference_map

find_backlink_handles(self, handle, include_classes=None)

source code 

Find all objects that hold a reference to the object handle. Returns an interator over alist of (class_name, handle) tuples.

Parameters:
  • handle (database handle) - handle of the object to search for.
  • include_classes (list of class names

    This default implementation does a sequencial scan through all the primary object databases and is very slow. Backends can override this method to provide much faster implementations that make use of additional capabilities of the backend.

    Note that this is a generator function, it returns a iterator for use in loops. If you want a list of the results use:

    > result_list = [i for i in find_backlink_handles(handle)]

    ) - list of class names to include in the results. Default: None means include all classes.
Overrides: dbbase.DbBase.find_backlink_handles

get_gramps_ids(self, obj_key)

source code 
Overrides: dbbase.DbBase.get_gramps_ids

has_gramps_id(self, obj_key, gramps_id)

source code 
Overrides: dbbase.DbBase.has_gramps_id

get_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_bookmarks

get_family_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_family_bookmarks

get_event_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_event_bookmarks

get_place_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_place_bookmarks

get_source_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_source_bookmarks

get_media_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_media_bookmarks

get_repo_bookmarks(self)

source code 

returns the list of Person handles in the bookmarks

Overrides: dbbase.DbBase.get_repo_bookmarks

get_note_bookmarks(self)

source code 

returns the list of Note handles in the bookmarks

Overrides: dbbase.DbBase.get_note_bookmarks