blib/lib/DBIO/Test/Schema/Year1999CDs.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DBIO/Test/Schema/TypedObject.pm ↑ Summary blib/lib/DBIO/Test/Schema/Year2000CDs.pm »
1 package DBIO::Test::Schema::Year1999CDs;
2 # ABSTRACT: Test virtual view result class for 1999 CDs
3 ## Used in 104view.t
4  
5 256 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 256 our $VERSION = '0.900007';
8  
9 256 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 256 ▶use base qw/DBIO::Test::BaseResult/;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 256 __PACKAGE__->table_class('DBIO::ResultSource::View');
14  
15 256 __PACKAGE__->table('year1999cds');
16 256 __PACKAGE__->result_source_instance->is_virtual(1);
17 256 __PACKAGE__->result_source_instance->view_definition(
18 "SELECT cdid, artist, title, single_track FROM cd WHERE year ='1999'"
19 );
20 256 __PACKAGE__->add_columns(
21 'cdid' => {
22 data_type => 'integer',
23 is_auto_increment => 1,
24 },
25 'artist' => {
26 data_type => 'integer',
27 },
28 'title' => {
29 data_type => 'varchar',
30 size => 100,
31 },
32 'single_track' => {
33 data_type => 'integer',
34 is_nullable => 1,
35 is_foreign_key => 1,
36 },
37 );
38 256 __PACKAGE__->set_primary_key('cdid');
39 256 __PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
40  
41 256 __PACKAGE__->belongs_to( artist => 'DBIO::Test::Schema::Artist' );
42 256 __PACKAGE__->has_many( tracks => 'DBIO::Test::Schema::Track', 'cd' );
43  
44 256 1;
45  
46 __END__
« blib/lib/DBIO/Test/Schema/TypedObject.pm ↑ Summary blib/lib/DBIO/Test/Schema/Year2000CDs.pm »