This package is part of the DBMDatabase manpage.
Copyright ©
1997 Curtis
E. Dyreson. All rights reserved.
This class represents a table in a DBMDatabase::Database. A table is a dbm file. Each entry in the table is a DBMDatabase::Tuple. The class has been configured to use either BSD, GDBM, or BigDB files. You must edit this package to configure it.
- The name of the table (a dbm file name).
Create a table with the give name (opens a dbm file). Second line.
DBMDatabase::Tuple $tuple
- The tuple to insert.
Insert a DBMDatabase::Tuple into the table. Will replace an existing tuple so be careful.
- The key for the tuple to retrieve, can be an DBMDatabase::Id or DBMDatabase::StringCol.
Delete a tuple. The function returns true or false depending on whether or not the tuple found and deleted.
- The key for the tuple to retrieve, can be an DBMDatabase::Id or DBMDatabase::StringCol.
Retrieve a tuple with the given key from the table. This routine will retrieve a tuple from the table, or if the tuple is not found it will return 0. Use as follows.
# we want to retrieve the tuple for the key "hi" $key = Id::fromString("hi"); # try to retrieve it $r = $table->retrieveTuple($key); # let's test if we found it if ($r) { # key was found in the table else { # key was not found }
Return a string of the key, value pairs (assumed to be Ids).
Return a string of the key, value pairs (assumed to be Id Lists).
Return a reference to the dbm file.
Return a list of the keys.
Return a list of the key values, but as integer values rather than byte sequences.
Return a string of the key values (assumed to be Ids).
Close the DBM file
Return a string of the key values (assumed to be Ids).