DBIx-Mint
view release on metacpan or search on metacpan
my @players = $team->get_players;
# Database modification methods include insert, update, and delete.
# They act on a single object when called as instance methods
# but over the whole table if called as class methods:
$team->name('Los Invencibles');
$team->update;
Bloodbowl::Coach->update(
{ status => 'suspended' },
{ password => 'blocked' });
Declaring the schema allows you to modify the data. To define a schema and to learn about data modification methods, look into L<DBIx::Mint::Schema> and L<DBIx::Mint::Table>.
If you only need to query the database, no schema is needed. L<DBIx::Mint::ResultSet> objects build database queries and fetch the resulting records:
my $rs = DBIx::Mint::ResultSet->new( table => 'coaches' );
# You can perform joins:
my @team_players = $rs->search( { 'me.id' => 1 } )
->inner_join( 'teams', { 'me.id' => 'coach' })
lib/DBIx/Mint.pm view on Meta::CPAN
my @players = $team->get_players;
# Database modification methods include insert, update, and delete.
# They act on a single object when called as instance methods
# but over the whole table if called as class methods:
$team->name('Los Invencibles');
$team->update;
Bloodbowl::Coach->update(
{ status => 'suspended' },
{ password => 'blocked' });
Declaring the schema allows you to modify the data. To define a schema and to learn about data modification methods, look into L<DBIx::Mint::Schema> and L<DBIx::Mint::Table>.
If you only need to query the database, no schema is needed. L<DBIx::Mint::ResultSet> objects build database queries and fetch the resulting records:
my $rs = DBIx::Mint::ResultSet->new( table => 'coaches' );
# You can perform joins:
my @team_players = $rs->search( { 'me.id' => 1 } )
->inner_join( 'teams', { 'me.id' => 'coach' })
( run in 0.580 second using v1.01-cache-2.11-cpan-49f99fa48dc )