Schema/ResultSet/Order.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 22 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/ResultSet.pm ↑ Summary
1 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Interchange6::Schema::ResultSet::Order;
4  
5 =head1 NAME
6  
7 Interchange6::Schema::ResultSet::Order
8  
9 =cut
10  
11 =head1 SYNOPSIS
12  
13 Provides extra accessor methods for L<Interchange6::Schema::Result::Order>
14  
15 =cut
16  
17 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶use parent 'Interchange6::Schema::ResultSet';
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 =head1 METHODS
23  
24 =head2 with_status
25  
26 Adds C<status> column which is available to order_by clauses and
27 whose value can be retrieved via
28 L<Interchange6::Schema::Result::Order/status>.
29  
30 =cut
31  
32 sub with_status {
33 1 ▶ my $self = shift;
Subroutine with_status: called CC=1 SCAR=0.0
Pod documented
34  
35 1 my $me = $self->me;
36  
37 1 return $self->search(
38 undef,
39 {
40 '+columns' => {
41 status => $self->correlate('statuses')->rows(1)
42 ->order_by('!created,!order_status_id')->get_column('status')
43 ->as_query,
44 },
45 }
46 );
47 }
48  
49 2 1;
« Schema/ResultSet.pm ↑ Summary