| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
2
|
|
|
2
|
|
28024
|
use utf8; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
12
|
|
|
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
|
|
|
2
|
|
103
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
44
|
|
|
18
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
64
|
|
|
19
|
2
|
|
|
2
|
|
11
|
use mro 'c3'; |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
19
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
53
|
use parent 'Interchange6::Schema::ResultSet'; |
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
11
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 METHODS |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 with_status |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Adds C<status> column which is available to order_by clauses and |
|
28
|
|
|
|
|
|
|
whose value can be retrieved via |
|
29
|
|
|
|
|
|
|
L<Interchange6::Schema::Result::Order/status>. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub with_status { |
|
34
|
1
|
|
|
1
|
1
|
5903
|
my $self = shift; |
|
35
|
|
|
|
|
|
|
|
|
36
|
1
|
|
|
|
|
21
|
return $self->search( |
|
37
|
|
|
|
|
|
|
undef, |
|
38
|
|
|
|
|
|
|
{ |
|
39
|
|
|
|
|
|
|
'+columns' => { |
|
40
|
|
|
|
|
|
|
status => $self->correlate('statuses')->rows(1) |
|
41
|
|
|
|
|
|
|
->order_by('!created,!order_status_id')->get_column('status') |
|
42
|
|
|
|
|
|
|
->as_query, |
|
43
|
|
|
|
|
|
|
}, |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
); |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |