NAME

WE::DB::Name - a name to id database

SYNOPSIS

new WE::DB::Name $rootdb, $databasefilename;

DESCRIPTION

A class for a name-to-id database.

CONSTRUCTOR new($class, $root, $file, %args)

Usually called from WE::DB.

METHODS

insert($name, $id)

Set a name for the specified id.

delete($name)

Delete the specified name from the database

get_id($name)

Get the id for the specified name, or return undef, if there is no such name in the database.

get_names($id)

Return an array of all names for the specified object id.

update($add_objects, $del_objects)

Update of the database by adding all names from $add_objects and deleting all names from $del_objects. $add_objects and $del_objects are array references with WE::Obj objects.

rebuild_db_contents($objdb)

Complete rebuild of the name database from the object database. $objdb is optional, by default the standard ObjDB of the Root is used.

delete_db_contents

Delete all database contents

disconnect

Disconnect the database. No further access on the database may be done.

all_names

Return an array with all used names.

exists

Return true if the name is already occupied.

AUTHOR

Slaven Rezic - slaven@rezic.de

SEE ALSO