Crop/Object/Warehouse/Lang/SQL/Query/Select/Node/Content.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 31 CC 2 SCAR 12.0
CC
2
Cov
0%
parse_row
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package Crop::Object::Warehouse::Lang::SQL::Query::Select::Node::Content;
2 use base qw/ Crop::Object::Warehouse::Lang::SQL::Query::Select::Node /;
3  
4 =begin nd
5 Class: Crop::Object::Warehouse::Lang::SQL::Query::Select::Node::Content
6 Content node.
7 =cut
8  
9 use v5.14;
10 use warnings;
11  
12 use Crop::Object::Constants;
13  
14 =begin nd
15 Method: parse_row ($row)
16 Handle row of the raw data from database and put object to the right place.
17
18 Parameters:
19 $row - hashref to the entire row
20 =cut
21 sub parse_row {
22 my ($self, $row) = @_;
23
24 my $item = $self->{class}->new($row->{$self->{table_effective}})->Set_state(DWHLINK);
25 $item->_Is_key_defined or return;
26
27 my $found_in_cache = $self->see_cache($item);
28
29 if ($found_in_cache) {
30 $item = $found_in_cache;
31 }
32
33 $self->{parent}{parent}{current}{$self->{parent_view}}->Push($item);
34 $self->{current} = $item;
35 }
36  
37 1;