Tapper/Schema/TestrunDB/Result/View020TestrunOverview.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Tapper/Schema/TestrunDB/Result/View010TestrunOverviewReports.pm ↑ Summary Tapper/Schema/TestrunDB/ResultSet/Queue.pm »
1 package Tapper::Schema::TestrunDB::Result::View020TestrunOverview;
2 10 our $AUTHORITY = 'cpan:TAPPER';
3 # the number is to sort classes on deploy
4 10 $Tapper::Schema::TestrunDB::Result::View020TestrunOverview::VERSION = '5.0.12';
5 10 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
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::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 10 __PACKAGE__->table_class('DBIx::Class::ResultSource::View');
12  
13 10 __PACKAGE__->table('view_testrun_overview');
14  
15 # virtual is needed when the query should accept parameters
16 10 __PACKAGE__->result_source_instance->is_virtual(0);
17 10 __PACKAGE__->result_source_instance->deploy_depends_on( [qw(Tapper::Schema::TestrunDB::Result::View010TestrunOverviewReports
18 Tapper::Schema::TestrunDB::Result::Report
19 Tapper::Schema::TestrunDB::Result::Suite
20 )] );
21 10 __PACKAGE__->result_source_instance->view_definition
22 (
23 "select vtor.primary_report_id as vtor_primary_report_id ".
24 " , vtor.rgt_testrun_id as vtor_rgt_testrun_id ".
25 " , vtor.rgts_success_ratio as vtor_rgts_success_ratio ".
26 " , report.id as report_id ".
27 " , report.machine_name as report_machine_name ".
28 " , report.created_at as report_created_at ".
29 " , report.suite_id as report_suite_id ".
30 " , suite.name as report_suite_name ".
31 "from view_testrun_overview_reports vtor, ".
32 " report report, ".
33 " suite suite ".
34 "where CAST(vtor.primary_report_id as UNSIGNED INTEGER)=report.id and ".
35 " report.suite_id=suite.id"
36 );
37  
38 10 __PACKAGE__->add_columns
39 (
40 # view_testrun_overview_reports
41 'vtor_primary_report_id' => { data_type => 'INT', size => 11 },
42 'vtor_rgt_testrun_id' => { data_type => 'INT', size => 11 },
43 'vtor_rgts_success_ratio' => { data_type => 'varchar', size => 20 },
44 # report
45 'report_id' => { data_type => 'INT', size => 11 },
46 'report_machine_name' => { data_type => 'varchar', size => 50 },
47 'report_created_at' => { data_type => 'DATETIME' },
48 # suite
49 'report_suite_id' => { data_type => 'INT', size => 11 },
50 'report_suite_name' => { data_type => 'varchar', size => 255 },
51 );
52  
53 10 1;
54  
55 __END__
« Tapper/Schema/TestrunDB/Result/View010TestrunOverviewReports.pm ↑ Summary Tapper/Schema/TestrunDB/ResultSet/Queue.pm »