DBIx::SQLEngine::Record::Extras - Provide extra methods
package My::Record; use DBIx::SQLEngine::Record::Class '-isasubclass', 'Extras'; my $sqldb = DBIx::SQLEngine->new( ... ); My::Record->table( $sqldb->table( 'foo' ) );
This package provides a multiply-composable collection of functionality for Record classes.
Don't use this module directly; instead, pass its name as a trait when you create a new record class. This package provides a multiply-composable collection of functionality for Record classes. It is combined with the base class and other traits by DBIx::SQLEngine::Record::Class.
$recordset = My::Students->fetch_records( criteria => {status=>'active'} );
Fetch all matching records and return them in a RecordSet.
$dave = My::Students->fetch_one( criteria => { name => 'Dave' } );
Fetch a single matching record.
$prisoner = My::Students->fetch_id( 6 );
Fetch a single record based on its primary key.
@results = My::Students->visit_records( \&mysub, criteria=> ... );
Calls the provided subroutine on each matching record as it is retrieved. Returns the accumulated results of each subroutine call (in list context).
$record->refetch_record();
Re-retrieve the values for this record from the database based on its primary key.
To install DBIx::SQLEngine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::SQLEngine
CPAN shell
perl -MCPAN -e shell install DBIx::SQLEngine
For more information on module installation, please visit the detailed CPAN module installation guide.