File Coverage

blib/lib/Cassandra/Client/ResultSet.pm
Criterion Covered Total %
statement 8 16 50.0
branch n/a
condition 0 6 0.0
subroutine 3 8 37.5
pod 4 5 80.0
total 15 35 42.8


line stmt bran cond sub pod time code
1             package Cassandra::Client::ResultSet;
2             our $AUTHORITY = 'cpan:TVDW';
3             $Cassandra::Client::ResultSet::VERSION = '0.21';
4 13     13   242 use 5.010;
  13         53  
5 13     13   88 use strict;
  13         41  
  13         1514  
6 13     13   78 use warnings;
  13         57  
  13         5388  
7              
8              
9             sub new {
10 0     0 0   my ($class, $raw_data, $decoder, $next_page)= @_;
11              
12 0           return bless {
13             raw_data => $raw_data,
14             decoder => $decoder,
15             next_page => $next_page,
16             }, $class;
17             }
18              
19              
20             sub rows {
21 0   0 0 1   return $_[0]{rows} ||= $_[0]{decoder}->decode(${$_[0]{raw_data}}, 0);
  0            
22             }
23              
24              
25             sub row_hashes {
26 0   0 0 1   return $_[0]{row_hashes} ||= $_[0]{decoder}->decode(${$_[0]{raw_data}}, 1);
  0            
27             }
28              
29              
30             sub column_names {
31             $_[0]{decoder}->column_names
32 0     0 1   }
33              
34              
35             sub next_page {
36             $_[0]{next_page}
37 0     0 1   }
38              
39              
40             1;
41              
42             __END__