* src/GrampsDb/_GrampsBSDDB.py (load): Use BTREE for

reference_map; sort reference_map_referenced_map index.
* src/GrampsDb/_ReadGedcom.py (parse_record): Restore add def_src.


svn: r5786
This commit is contained in:
Alex Roitman 2006-01-18 16:51:06 +00:00
parent 6daee532d9
commit a2674e2607
3 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2006-01-18 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py (load): Use BTREE for
reference_map; sort reference_map_referenced_map index.
* src/GrampsDb/_ReadGedcom.py (parse_record): Restore add def_src.
2006-01-17 Don Allingham <don@gramps-project.org>
* src/DbPrompter.py: removed
* src/gramps.glade: delete unused stuff

View File

@ -282,7 +282,10 @@ class GrampsBSDDB(GrampsDbBase):
self.metadata = self.open_table(self.full_name, "meta")
self.person_map = self.open_table(self.full_name, "person")
self.repository_map = self.open_table(self.full_name, "repository")
self.reference_map = self.open_table(self.full_name, "reference_map")
self.reference_map = dbshelve.DBShelf(self.env)
self.reference_map.db.set_pagesize(16384)
self.reference_map.open(self.full_name, 'reference_map', db.DB_BTREE,
db.DB_CREATE|db.DB_AUTO_COMMIT, 0666)
callback(37)
@ -356,7 +359,7 @@ class GrampsBSDDB(GrampsDbBase):
db.DB_BTREE, flags=table_flags)
self.reference_map_referenced_map = db.DB(self.env)
self.reference_map_referenced_map.set_flags(db.DB_DUP)
self.reference_map_referenced_map.set_flags(db.DB_DUP|db.DB_DUPSORT)
self.reference_map_referenced_map.open(self.full_name,
"reference_map_referenced_map",
db.DB_BTREE, flags=table_flags)

View File

@ -670,10 +670,10 @@ class GedcomParser:
if child:
child.add_address(self.addr)
self.db.commit_person(child, self.trans)
#if len(self.family.get_source_references()) == 0:
# sref = RelLib.SourceRef()
# sref.set_base_handle(self.def_src.get_handle())
# self.family.add_source_reference(sref)
if len(self.family.get_source_references()) == 0:
sref = RelLib.SourceRef()
sref.set_base_handle(self.def_src.get_handle())
self.family.add_source_reference(sref)
self.db.commit_family(self.family, self.trans)
del self.family
elif matches[2] == "INDI":
@ -683,10 +683,10 @@ class GedcomParser:
self.person = self.find_or_create_person(self.map_gid(gid))
self.added[self.person.get_handle()] = 1
self.parse_individual()
#if len(self.person.get_source_references()) == 0:
# sref = RelLib.SourceRef()
# sref.set_base_handle(self.def_src.get_handle())
# self.person.add_source_reference(sref)
if len(self.person.get_source_references()) == 0:
sref = RelLib.SourceRef()
sref.set_base_handle(self.def_src.get_handle())
self.person.add_source_reference(sref)
self.db.commit_person(self.person, self.trans)
del self.person
elif matches[2] in ["SUBM","SUBN","REPO"]: