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.11';
4             # ABSTRACT: Tapper - Containing hosts used by queues
5              
6 7     7   3481 use strict;
  7         13  
  7         179  
7 7     7   33 use warnings;
  7         13  
  7         159  
8              
9 7     7   32 use parent 'DBIx::Class';
  7         11  
  7         45  
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) 2019 by Advanced Micro Devices, Inc..
56              
57             This is free software, licensed under:
58              
59             The (two-clause) FreeBSD License
60              
61             =cut