NAME
Audio::DB::Query - query methods of a Audio::DB database
SYNOPSIS
Audio::DB::Query objects are used internally by Audio::DB::Reports and Audio::DB::Web. You will not normally interact with Audio::DB::Query objects. The documentation contained here is listed for completeness as well as for those looking to extend the functionality of Audio::DB.
METHODS
$report->fetch_class(@options);
Provided with a table name, fetch_class returns an array reference of appropriate objects. For example, passing the -class=>'artists' option results in an array reference of Audio::DB::DataTypes::Artist objects.
Options:
Some classes accept additional parameters.
Class: albums
TODO: COMPLETE
By default, album objects will not be populated with songs. To retreive populated Album objects, try using ...
If provided, Album objects will be populated with Song
objects. These can be accessed by calling the songs() method on
each album object.
@albums = $music->fetch_class(-class=>'artist');
foreach my $album_obj (@albums) {
print $album_obj->album,"\n";
print join("\n",map {$_->title} $album_obj->songs);
}
If not provided, summaries that require touching each song (ie to
see if it is a compilation album) will still be created, but the
individual songs will not be returned. This can be useful ina
situation requiring greater speed and less memory consumption.
count()
Usage: count('type');
Where type is one of artists, albums, songs, genres
Status: internal
Generate a simple count of the number of $type entries in the database
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 41:
You can't have =items (as at line 47) unless the first thing after the =over is an =item
- Around line 103:
You forgot a '=back' before '=head1'