DBIx/Class/Row/SQLA2Support.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 93.1% 27 / 29 CC 2 SCAR 2.9
CC
2
Cov
95%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« DBIx/Class/Schema/SQLA2Support.pm ↑ Summary
1 package DBIx::Class::Row::SQLA2Support;
2 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use parent 'DBIx::Class::Row';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod documented
7 3 my ($class, $attrs) = @_;
8 3 ▶ my $sqla2_passthru = delete $attrs->{-sqla2} || {};
Condition50%1/2
delete $attrs->{'-sqla2'} || {}
l!l
30
MC/DC0%0/1
delete $attrs->{'-sqla2'} || {}
delete $attrs->{'-sqla2'}
Truth table50%1/2
A
A= delete $attrs->{'-sqla2'}
Aresult
11
00
9 3 my $new = $class->next::method($attrs);
10 3 $new->{_sqla2_attrs} = $sqla2_passthru;
11  
12 3 return $new;
13 }
14  
15 3 ▶sub insert {
Subroutine insert: called CC=1 SCAR=0.0
Pod documented
16 3 my ($self, @args) = @_;
17 3 my $extras = delete $self->{_sqla2_attrs};
18 # this should allow relations to fail if they don't have a on_conflict defined
19 3 local $self->result_source->storage->sql_maker->{_sqla2_insert_attrs} = $extras;
20 3 $self->next::method(@args);
21 }
22  
23 5 1
« DBIx/Class/Schema/SQLA2Support.pm ↑ Summary