Salvation::Service::DataSet - Base class for DataSet
package YourSystem::Services::SomeService::DataSet; use Moose; extends 'Salvation::Service::DataSet'; no Moose;
Moose
Salvation::Roles::ServiceReference
$dataset -> fetch();
Returns next row from the DataSet moving current position of internal iterator one step forward.
$dataset -> first();
Returns first row from the DataSet.
$dataset -> get(); $dataset -> get( $index );
Returns a row from the DataSet. $index is an integer starting from zero. If $index is omitted - current position of internal iterator is used.
$index
$dataset -> last();
Returns last row from the DataSet.
$dataset -> seek( $index );
Sets position of internal iterator. $index is an integer starting from zero.
You can redefine following methods to achieve your own goals.
Should return an ArrayRef. One element - one row. Each element is an abstract object that will be processed by a view, or somehow else if you want to. The only argument is $self which is current view's instance.
$self
To install Salvation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Salvation
CPAN shell
perl -MCPAN -e shell install Salvation
For more information on module installation, please visit the detailed CPAN module installation guide.