NAME

WAIT::Database - Module fo maintaining WAIT databases

SYNOPSIS

require WAIT::Database;

DESCRIPTION

The modules handles creating, opening, and deleting of databases and tables.

Constructor create

$db = WAIT::Database->create(
                             name      => <name>,
                             directory => <dir>
                            );

Create a new database.

name name

mandatory

directory directory

Directory which should contain the database (defaults to the current directory).

uniqueatt true

If given, the database will require unique attributes over all tables.

The method will croak on failure.

Constructor open

$db = WAIT::Database->open(
                           name => "foo",
                           directory => "bar"
                          );

Open an existing database foo in directory bar.

$db->dispose;

Dispose a database. Remove all associated files. This may fail if the database or one of its tables is still open. Failure will be indicated by a false return value.

$db->close;

Close a database saving all meta data after closing all associated tables.

$db->create_table(name => tname, ... );

Create a new table with name tname. All parameters are passed to WAIT::Table->new together with a filename to use. See WAIT::Table for which attributes are required. The method returns a table handle (WAIT::Table::Handle).

$db->table(name => tname);

Open a new table with name tname. The method returns a table handle (WAIT::Table::Handle).

$db->drop(name => tname);

Drop the table named tname. The table should be closed before calling drop.

AUTHOR

Ulrich Pfeifer <pfeifer@ls6.informatik.uni-dortmund.de>