File Coverage

blib/lib/Tapper/Schema/TestrunDB/Result/QueueHost.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Tapper::Schema::TestrunDB::Result::QueueHost;
2             our $AUTHORITY = 'cpan:TAPPER';
3             $Tapper::Schema::TestrunDB::Result::QueueHost::VERSION = '5.0.9';
4             # ABSTRACT: Tapper - Containing hosts used by queues
5              
6 7     7   2876 use strict;
  7         9  
  7         168  
7 7     7   23 use warnings;
  7         8  
  7         169  
8              
9 7     7   23 use parent 'DBIx::Class';
  7         8  
  7         27  
10              
11             __PACKAGE__->load_components("Core");
12             __PACKAGE__->table("queue_host");
13             __PACKAGE__->add_columns
14             (
15             "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, },
16             "queue_id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_foreign_key => 1, },
17             "host_id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_foreign_key => 1, },
18             );
19              
20             __PACKAGE__->set_primary_key(qw/id/);
21              
22             (my $basepkg = __PACKAGE__) =~ s/::\w+$//;
23              
24             __PACKAGE__->belongs_to( queue => "${basepkg}::Queue", { 'foreign.id' => 'self.queue_id' });
25             __PACKAGE__->belongs_to( host => "${basepkg}::Host", { 'foreign.id' => 'self.host_id' });
26              
27             1;
28              
29             __END__
30              
31             =pod
32              
33             =encoding UTF-8
34              
35             =head1 NAME
36              
37             Tapper::Schema::TestrunDB::Result::QueueHost - Tapper - Containing hosts used by queues
38              
39             =head1 AUTHORS
40              
41             =over 4
42              
43             =item *
44              
45             AMD OSRC Tapper Team <tapper@amd64.org>
46              
47             =item *
48              
49             Tapper Team <tapper-ops@amazon.com>
50              
51             =back
52              
53             =head1 COPYRIGHT AND LICENSE
54              
55             This software is Copyright (c) 2017 by Advanced Micro Devices, Inc..
56              
57             This is free software, licensed under:
58              
59             The (two-clause) FreeBSD License
60              
61             =cut