Class::DBI::Sweet
Edit Page
Report
Scan day: 03 March 2014 UTC
23
Virus safety - good
Description: Provides convenient count, search, page, and cache functions and integrates these functions with Class::DBI in a convenient and efficient way.
Class::DBI::Sweet - search.cpan.org Module Version: 0.11 Class::DBI::Sweet - Making sweet things sweeter package MyApp::DBI; use base 'Class::DBI::Sweet'; MyApp::DBI->connection('dbi:driver:dbname', 'username', 'password'); package MyApp::Article; use base 'MyApp::DBI'; use DateTime; __PACKAGE__->table('article'); __PACKAGE__->columns( Primary => qw[ id ] ); __PACKAGE__->columns( Essential => qw[ title created_on created_by ] ); __PACKAGE__->has_a( created_on => 'DateTime', inflate => sub { DateTime->from_epoch( epoch => shift ) }, deflate => sub { shift->epoch } ); # Simple search MyApp::Article->search( created_by => 'sri', { order_by => 'title' } ); MyApp::Article->count( created_by => 'sri' ); MyApp::Article->page( created_by => 'sri', { page => 5 } ); MyApp::Article->retrieve_all( order_by => 'created_on' ); # More powerful search with deflating $criteria = { created_on => { -between => [ DateTime->new( year => 2004 ), DateTime->new( year => 2005 ), ] }, created_by => [ qw(chansen draven gabb jester sri) ], title => { -like => [ qw( perl% catalyst% ) ] } }; MyApp::Article->search( $criteria, { rows => 30 } ); MyApp::Article->count($criteria); MyApp::Article->page( $criteria, { rows => 10, page => 2 } ); MyApp::Article->retrieve_next( $criteria, { order_by => 'created_on' } ); MyApp::Article->retrieve_previous( $criteria, { order_by => 'created_on' } ); MyApp::Article->default_search_attributes( { order_by => 'created_on' } ); # Automatic joins for search and count MyApp::CD->has_many(tracks => 'MyApp::Track'); MyApp::CD-&
Size: 2048 chars
Contact Information
Email: —
Phone&Fax: —
Address: —
Extended: —
WEBSITE Info
| Page title: | Class::DBI::Sweet - search.cpan.org |
| Keywords: | |
| Description: | |
| IP-address: | 199.15.176.161 |
WHOIS Info
| NS | Name Server:NS2.XS4ALL.NL Name Server:NS.XS4ALL.NL Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: |
| WHOIS | Status: clientTransferProhibited |
| Date | Creation Date: 1998-01-30T05:00:00Z Expiry Date: 2016-01-29T05:00:00Z |
