lib/DBIx/ActiveRecord/Arel/Join.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 90.9% 20 / 22 CC 2 SCAR 3.4
CC
2
Cov
100%
build
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« lib/DBIx/ActiveRecord/Arel/Value.pm ↑ Summary lib/DBIx/ActiveRecord/Arel/Query/Delete.pm »
1 package DBIx::ActiveRecord::Arel::Join;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 16 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
6 16 my ($self, $join_type, $primary_key_column, $foreign_key_column) = @_;
7 16 bless {type => $join_type, pk => $primary_key_column, fk => $foreign_key_column}, $self;
8 }
9  
10 18 ▶sub build {
Subroutine build: called CC=2 SCAR=6.9
Pod undocumented
11 18 my $self = shift;
12 18 my $table = $self->{fk}->table->table;
13 18 my $alias = $DBIx::ActiveRecord::Arel::Column::AS->{$table};
14 18 ▶ $table .= " $alias" if $alias;
Branch: 1 branch
BranchTrueFalseTotal
if $alias 1 17 18
15 18 $self->{type}.' '.$table.' ON '.$self->{fk}->name.' = '.$self->{pk}->name;
16 }
17  
18 2 1;
« lib/DBIx/ActiveRecord/Arel/Value.pm ↑ Summary lib/DBIx/ActiveRecord/Arel/Query/Delete.pm »