| WAIT documentation | view source | Contained in the WAIT distribution. |
WAIT::Database - Module fo maintaining WAIT databases
require WAIT::Database;
The modules handles creating, opening, and deleting of databases and tables.
$db = WAIT::Database->create(
name => <name>,
directory => <dir>
);
Create a new database.
mandatory
Directory which should contain the database (defaults to the current directory).
If given, the database will require unique attributes over all tables.
The method will croak on failure.
$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.
Ulrich Pfeifer <pfeifer@ls6.informatik.uni-dortmund.de>
| WAIT documentation | view source | Contained in the WAIT distribution. |