Alzabo::Runtime::Row - Row objects
use Alzabo::Runtime::Row;
These objects represent actual rows from the database containing actual data. In general, you will want to use the Alzabo::Runtime::Table object to retrieve rows. The Alzabo::Runtime::Table object can return either single rows or row cursors.
Alzabo::Runtime::Table
Returns a list of values matching the specified columns in a list context. In scalar context it returns only a single value (the first column specified).
If no columns are specified, it will return the values for all of the columns in the table, in the order that are returned by Alzabo::Runtime::Table->columns.
Alzabo::Runtime::Table->columns
Returns a hash of column names to values matching the specified columns.
If no columns are specified, it will return the values for all of the columns in the table.
Given a hash of columns and values, attempts to update the database to and the object to represent these new values.
Deletes the row from the RDBMS.
Returns the row's id value as a string. This can be passed to the Alzabo::Runtime::Table->row_by_id method to recreate the row later.
Alzabo::Runtime::Table->row_by_id
Indicates whether or not the given row is a real or potential row.
Returns the Alzabo::Runtime::Table object that this row belongs to.
Returns the Alzabo::Runtime::Schema object that this row's table belongs to. This is a shortcut for $row->table->schema.
Alzabo::Runtime::Schema
$row->table->schema
foreign_key => Alzabo::Runtime::ForeignKey object
Alzabo::Runtime::ForeignKey
Given a foreign key object, this method returns either an Alzabo::Runtime::Row object or an Alzabo::Runtime::RowCursor object for the row(s) in the table that to which the relationship exists, based on the value of the relevant column(s) in the current row.
Alzabo::Runtime::Row
Alzabo::Runtime::RowCursor
The type of object returned is based on the cardinality of the relationship. If the relationship says that there could only be one matching row, then a row object is returned, otherwise it returns a cursor.
All other parameters given will be passed directly to the new method.
new
table => Alzabo::Runtime::Table object
pk => (see below)
The pk parameter may be one of two things. If the table has only a single column primary key, it can be a simple scalar with the value of that primary key for this row.
pk
If the primary key is more than one column than it must be a hash reference containing column names and values such as:
{ pk_column1 => 1, pk_column2 => 'foo' }
A new Alzabo::Runtime::Row object. If no object matches these values then an exception will be thrown.
Alzabo::Exception::NoSuchRow
Dave Rolsky, <autarch@urth.org>
To install Alzabo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alzabo
CPAN shell
perl -MCPAN -e shell install Alzabo
For more information on module installation, please visit the detailed CPAN module installation guide.