File Coverage

blib/lib/DBIx/DataModel/Schema/ResultAs/Subquery.pm
Criterion Covered Total %
statement 14 14 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             #----------------------------------------------------------------------
2             package DBIx::DataModel::Schema::ResultAs::Subquery;
3             #----------------------------------------------------------------------
4 3     3   2319 use warnings;
  3         9  
  3         120  
5 3     3   19 use strict;
  3         7  
  3         116  
6              
7 3     3   23 use parent 'DBIx::DataModel::Schema::ResultAs';
  3         5  
  3         57  
8              
9             sub get_result {
10 3     3 1 9 my ($self, $statement) = @_;
11              
12 3         22 $statement->_forbid_callbacks(__PACKAGE__);
13 3 50       10 $statement->sqlize if $statement->status < DBIx::DataModel::Statement::SQLIZED;
14              
15 3         30 my ($sql, @bind) = $statement->sql;
16 3         58 return \ ["($sql)", @bind]; # ref to an arrayref with SQL and bind values
17             }
18              
19             1;
20              
21             __END__