Tapper/Schema/TestrunDB/Result/ReportgroupArbitrary.pm

filter: Statementstmt 75.0% 18 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 72.7% 24 / 33 CC 2 SCAR 9.8
CC
2
Cov
69%
groupreports
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Tapper/Schema/TestrunDB/Result/Host.pm ↑ Summary Tapper/Schema/TestrunDB/Result/ScenarioElement.pm »
1 package Tapper::Schema::TestrunDB::Result::ReportgroupArbitrary;
2 10 our $AUTHORITY = 'cpan:TAPPER';
3 10 $Tapper::Schema::TestrunDB::Result::ReportgroupArbitrary::VERSION = '5.0.12';
4 # ABSTRACT: Tapper - Containing relations between reports and arbitrary ids
5  
6 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 10 ▶use parent 'DBIx::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 10 __PACKAGE__->load_components("Core");
12 10 __PACKAGE__->table("reportgrouparbitrary");
13 10 __PACKAGE__->add_columns
14 (
15 "arbitrary_id", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, },
16 "report_id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_foreign_key => 1, },
17 "primaryreport", { data_type => "INT", default_value => undef, is_nullable => 1, size => 11, },
18 "owner", { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 255, },
19 );
20  
21 10 __PACKAGE__->set_primary_key(qw/arbitrary_id report_id/);
22  
23 10 __PACKAGE__->belongs_to ( report => 'Tapper::Schema::TestrunDB::Result::Report', { 'foreign.id' => 'self.report_id' });
24  
25 # -------------------- methods on results --------------------
26  
27  
28 0 ▶sub groupreports {
Subroutine groupreports: not called CC=2 SCAR=17.9
Pod documented
29 0 my ($self) = @_;
30  
31 0 my @report_ids;
32 0 my $rg = $self->result_source->schema->resultset('ReportgroupArbitrary')->search({ arbitrary_id => $self->arbitrary_id });
33 0 ▶ while (my $rg_entry = $rg->next) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $rg_entry = $rg->next) 0 0 0
34 0 push @report_ids, $rg_entry->report_id;
35 }
36 0 return $self->result_source->schema->resultset('Report')->search({ id => [ -or => [ @report_ids ] ] });
37 }
38  
39  
40 sub sqlt_deploy_hook
41 8 ▶{
Subroutine sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod documented
42 8 my ($self, $sqlt_table) = @_;
43 # $sqlt_table->add_index(name => 'reportgrouparbitrary_idx_report_id', fields => ['report_id']); # implicitely done(?)
44 }
45  
46 10 1;
47  
48 __END__
« Tapper/Schema/TestrunDB/Result/Host.pm ↑ Summary Tapper/Schema/TestrunDB/Result/ScenarioElement.pm »