| 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
| |||||||||||
| 15 | 18 | $self->{type}.' '.$table.' ON '.$self->{fk}->name.' = '.$self->{pk}->name; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 2 | 1; | |||||||||