NAME

cs::DBI::TableObject - base class for objects built on hash tables


SYNOPSIS

use cs::DBI::TableObject;


DESCRIPTION

The cs::DBI::TableObject module provides a base class for objects built on a database table with a primary key.


OBJECT CREATION

new cs::DBI::TableObject dbh,table,keyfield,where
Return an object attached to the table specified. Note: multiple calls to new with the same arguments obtain multiple references to the same cs::DBI::hashtable (though you shou;dn't consider this guarenteed - this is more a warning that new doesn't always make a new object).


OBJECT METHODS FOR A TABLE OBJECT

Row(key)
Obtain an object representing the row with the specified key.

AddRow(hashref)
Add a row specified by hashref to the table. Returns undef on error or the cs::DBI::last_id() value.


OBJECT METHODS FOR A ROW OBJECT

Table()
Return the table object this row came from.

GetSet(field,value)
If value is omitted, return the current value of the field. If supplied, set the value of the field.


SEE ALSO

cs::DBI(3), cs::DBI::Table::Hash(3)


AUTHOR

Cameron Simpson <cs@zip.com.au>