File Coverage

blib/lib/LittleORM/Filter/Update.pm
Criterion Covered Total %
statement 3 11 27.2
branch n/a
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 14 28.5


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 1     1   4 use strict;
  1         2  
  1         117  
3              
4             package LittleORM::Filter;
5              
6             # update related subs moved here to keep module file size from growing
7             # too much
8              
9             sub update
10             {
11 0     0 0   my $self = shift;
12              
13 0           assert( scalar @{ $self -> joined_tables() } == 0,
  0            
14             'update is not defined for filter with joined tables' );
15              
16 0           assert( ( not defined $self -> returning_field() ),
17             'update is not defined for filter with returning_field() set' );
18              
19 0           map { assert( $_ -> model() eq $self -> model() ); } @{ $self -> clauses() };
  0            
  0            
20              
21 0           return $self -> call_orm_method( 'update',
22             &LittleORM::Model::__for_write(),
23             @_,
24             _include_table_alias_into_sql => 0 );
25            
26             }
27              
28             42;