blib/lib/App/Netdisco/DB/ResultSet/DevicePortLog.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
with_times
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package App::Netdisco::DB::ResultSet::DevicePortLog;
2 use base 'App::Netdisco::DB::ResultSet';
3  
4 use strict;
5 use warnings;
6  
7 __PACKAGE__->load_components(qw/
8 +App::Netdisco::DB::ExplicitLocking
9 /);
10  
11 =head1 ADDITIONAL METHODS
12  
13 =head2 with_times
14  
15 This is a modifier for any C<search()> which will add the following additional
16 synthesized column to the result set:
17  
18 =over 4
19  
20 =item creation_stamp
21  
22 =back
23  
24 =cut
25  
26 sub with_times {
27 my ($rs, $cond, $attrs) = @_;
28  
29 return $rs
30 ->search_rs($cond, $attrs)
31 ->search({},
32 {
33 '+columns' => {
34 creation_stamp => \"to_char(creation, 'YYYY-MM-DD HH24:MI:SS')",
35 },
36 });
37 }
38  
39 1;