| 1 | # RDF::Query::ExecutionContext | ||||||||||||
| 2 | # ----------------------------------------------------------------------------- | ||||||||||||
| 3 | |||||||||||||
| 4 | =head1 NAME | ||||||||||||
| 5 | |||||||||||||
| 6 | RDF::Query::ExecutionContext - Query execution context | ||||||||||||
| 7 | |||||||||||||
| 8 | =head1 VERSION | ||||||||||||
| 9 | |||||||||||||
| 10 | This document describes RDF::Query::ExecutionContext version 2.919. | ||||||||||||
| 11 | |||||||||||||
| 12 | =head1 METHODS | ||||||||||||
| 13 | |||||||||||||
| 14 | =over 4 | ||||||||||||
| 15 | |||||||||||||
| 16 | =cut | ||||||||||||
| 17 | |||||||||||||
| 18 | package RDF::Query::ExecutionContext; | ||||||||||||
| 19 | |||||||||||||
| 20 | 35 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | 35 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 22 | |||||||||||||
| 23 | ###################################################################### | ||||||||||||
| 24 | |||||||||||||
| 25 | 35 | our ($VERSION); | |||||||||||
| 26 | 35 | ▶ | BEGIN { | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 27 | 35 | $VERSION = '2.919'; | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | ###################################################################### | ||||||||||||
| 31 | |||||||||||||
| 32 | =item C<< new ( model => $model, query => $query, bound => \%bound ) >> | ||||||||||||
| 33 | |||||||||||||
| 34 | =cut | ||||||||||||
| 35 | |||||||||||||
| 36 | 158 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 37 | 158 | my $class = shift; | |||||||||||
| 38 | 158 | my %args = @_; | |||||||||||
| 39 | 158 | my $self = bless( [{ %args }], $class ); | |||||||||||
| 40 | 158 | return $self; | |||||||||||
| 41 | } | ||||||||||||
| 42 | |||||||||||||
| 43 | =item C<< copy ( %new_args ) >> | ||||||||||||
| 44 | |||||||||||||
| 45 | =cut | ||||||||||||
| 46 | |||||||||||||
| 47 | 112 | ▶ | sub copy { | ||||||||||
|
Subroutine
copy: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 48 | 112 | my $self = shift; | |||||||||||
| 49 | 112 | my %args = @_; | |||||||||||
| 50 | 112 | my $class = ref($self); | |||||||||||
| 51 | 112 | my @data; | |||||||||||
| 52 | 112 | foreach my $i (0 .. $#{ $self }) { | |||||||||||
| 53 | 112 | push(@data, { %{ $self->[$i] } }); | |||||||||||
| 54 | } | ||||||||||||
| 55 | 112 | @{ $data[0] }{ keys %args } = values %args; | |||||||||||
| 56 | 112 | return bless( \@data, $class ); | |||||||||||
| 57 | } | ||||||||||||
| 58 | |||||||||||||
| 59 | =item C<< pushstack >> | ||||||||||||
| 60 | |||||||||||||
| 61 | =cut | ||||||||||||
| 62 | |||||||||||||
| 63 | 0 | ▶ | sub pushstack { | ||||||||||
|
Subroutine
pushstack: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 64 | 0 | my $self = shift; | |||||||||||
| 65 | 0 | unshift( @{ $self }, {} ); | |||||||||||
| 66 | } | ||||||||||||
| 67 | |||||||||||||
| 68 | =item C<< popstack >> | ||||||||||||
| 69 | |||||||||||||
| 70 | =cut | ||||||||||||
| 71 | |||||||||||||
| 72 | 0 | ▶ | sub popstack { | ||||||||||
|
Subroutine
popstack: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 73 | 0 | my $self = shift; | |||||||||||
| 74 | 0 | shift( @{ $self } ); | |||||||||||
| 75 | } | ||||||||||||
| 76 | |||||||||||||
| 77 | =item C<< model >> | ||||||||||||
| 78 | |||||||||||||
| 79 | =cut | ||||||||||||
| 80 | |||||||||||||
| 81 | 1142 | ▶ | sub model { | ||||||||||
|
Subroutine
model: called CC=2 SCAR=7.4
Pod
documented
| |||||||||||||
| 82 | 1142 | my $self = shift; | |||||||||||
| 83 | 1142 | my $model = $self->_get_value( 'model', @_ ); | |||||||||||
| 84 | 1142 | ▶ | unless ($model) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 85 | 0 | $model = RDF::Trine::Model->temporary_model; | |||||||||||
| 86 | } | ||||||||||||
| 87 | 1142 | return $model; | |||||||||||
| 88 | } | ||||||||||||
| 89 | |||||||||||||
| 90 | =item C<< query >> | ||||||||||||
| 91 | |||||||||||||
| 92 | =cut | ||||||||||||
| 93 | |||||||||||||
| 94 | 762 | ▶ | sub query { | ||||||||||
|
Subroutine
query: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 95 | 762 | my $self = shift; | |||||||||||
| 96 | 762 | return $self->_get_value( 'query', @_ ); | |||||||||||
| 97 | } | ||||||||||||
| 98 | |||||||||||||
| 99 | =item C<< options >> | ||||||||||||
| 100 | |||||||||||||
| 101 | =cut | ||||||||||||
| 102 | |||||||||||||
| 103 | 850 | ▶ | sub options { | ||||||||||
|
Subroutine
options: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 104 | 850 | my $self = shift; | |||||||||||
| 105 | 850 | return $self->_get_value( 'options', @_ ); | |||||||||||
| 106 | } | ||||||||||||
| 107 | |||||||||||||
| 108 | =item C<< bound >> | ||||||||||||
| 109 | |||||||||||||
| 110 | =cut | ||||||||||||
| 111 | |||||||||||||
| 112 | 523 | ▶ | sub bound { | ||||||||||
|
Subroutine
bound: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||||
| 113 | 523 | my $self = shift; | |||||||||||
| 114 | 523 | ▶ | return $self->_get_value( 'bound', @_ ) || {}; | ||||||||||
|
Condition50%1/2
$self->_get_value('bound', @_) || {}
MC/DC0%0/1
$self->_get_value('bound', @_) || {}
$self->_get_value('bound', @_)
Truth table50%1/2
A
A= $self->_get_value('bound', @_)
| |||||||||||||
| 115 | } | ||||||||||||
| 116 | |||||||||||||
| 117 | =item C<< bind_variable ( $varname => $node ) >> | ||||||||||||
| 118 | |||||||||||||
| 119 | =cut | ||||||||||||
| 120 | |||||||||||||
| 121 | 0 | ▶ | sub bind_variable { | ||||||||||
|
Subroutine
bind_variable: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 122 | 0 | my $self = shift; | |||||||||||
| 123 | 0 | my $var = shift; | |||||||||||
| 124 | 0 | my $term = shift; | |||||||||||
| 125 | 0 | ▶ | my $bound = $self->_get_value( 'bound', @_ ) || {}; | ||||||||||
|
Condition0%0/2
$self->_get_value('bound', @_) || {}
MC/DC0%0/1
$self->_get_value('bound', @_) || {}
$self->_get_value('bound', @_)
Truth table0%0/2
A
A= $self->_get_value('bound', @_)
| |||||||||||||
| 126 | 0 | $bound->{$var} = $term; | |||||||||||
| 127 | 0 | return $self->_get_value('bound', $bound); | |||||||||||
| 128 | } | ||||||||||||
| 129 | |||||||||||||
| 130 | =item C<< base_uri >> | ||||||||||||
| 131 | |||||||||||||
| 132 | =cut | ||||||||||||
| 133 | |||||||||||||
| 134 | 0 | ▶ | sub base_uri { | ||||||||||
|
Subroutine
base_uri: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 135 | 0 | my $self = shift; | |||||||||||
| 136 | 0 | ▶ | return $self->_get_value( 'base_uri', @_ ) || {}; | ||||||||||
|
Condition0%0/2
$self->_get_value('base_uri', @_) || {}
MC/DC0%0/1
$self->_get_value('base_uri', @_) || {}
$self->_get_value('base_uri', @_)
Truth table0%0/2
A
A= $self->_get_value('base_uri', @_)
| |||||||||||||
| 137 | } | ||||||||||||
| 138 | |||||||||||||
| 139 | =item C<< ns >> | ||||||||||||
| 140 | |||||||||||||
| 141 | =cut | ||||||||||||
| 142 | |||||||||||||
| 143 | 0 | ▶ | sub ns { | ||||||||||
|
Subroutine
ns: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 144 | 0 | my $self = shift; | |||||||||||
| 145 | 0 | ▶ | return $self->_get_value( 'ns', @_ ) || {}; | ||||||||||
|
Condition0%0/2
$self->_get_value('ns', @_) || {}
MC/DC0%0/1
$self->_get_value('ns', @_) || {}
$self->_get_value('ns', @_)
Truth table0%0/2
A
A= $self->_get_value('ns', @_)
| |||||||||||||
| 146 | } | ||||||||||||
| 147 | |||||||||||||
| 148 | =item C<< logger >> | ||||||||||||
| 149 | |||||||||||||
| 150 | =cut | ||||||||||||
| 151 | |||||||||||||
| 152 | 3 | ▶ | sub logger { | ||||||||||
|
Subroutine
logger: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 153 | 3 | my $self = shift; | |||||||||||
| 154 | 3 | return $self->_get_value( 'logger', @_ ); | |||||||||||
| 155 | } | ||||||||||||
| 156 | |||||||||||||
| 157 | =item C<< costmodel >> | ||||||||||||
| 158 | |||||||||||||
| 159 | =cut | ||||||||||||
| 160 | |||||||||||||
| 161 | 0 | ▶ | sub costmodel { | ||||||||||
|
Subroutine
costmodel: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 162 | 0 | my $self = shift; | |||||||||||
| 163 | 0 | return $self->_get_value( 'costmodel', @_ ); | |||||||||||
| 164 | } | ||||||||||||
| 165 | |||||||||||||
| 166 | =item C<< requested_variables >> | ||||||||||||
| 167 | |||||||||||||
| 168 | =cut | ||||||||||||
| 169 | |||||||||||||
| 170 | 153 | ▶ | sub requested_variables { | ||||||||||
|
Subroutine
requested_variables: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 171 | 153 | my $self = shift; | |||||||||||
| 172 | 153 | return $self->_get_value( 'requested_variables', @_ ); | |||||||||||
| 173 | } | ||||||||||||
| 174 | |||||||||||||
| 175 | =item C<< optimize >> | ||||||||||||
| 176 | |||||||||||||
| 177 | =cut | ||||||||||||
| 178 | |||||||||||||
| 179 | 27 | ▶ | sub optimize { | ||||||||||
|
Subroutine
optimize: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 180 | 27 | my $self = shift; | |||||||||||
| 181 | 27 | return $self->_get_value( 'optimize', @_ ); | |||||||||||
| 182 | } | ||||||||||||
| 183 | |||||||||||||
| 184 | =item C<< strict_errors >> | ||||||||||||
| 185 | |||||||||||||
| 186 | =cut | ||||||||||||
| 187 | |||||||||||||
| 188 | 5 | ▶ | sub strict_errors { | ||||||||||
|
Subroutine
strict_errors: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 189 | 5 | my $self = shift; | |||||||||||
| 190 | 5 | return $self->_get_value( 'strict_errors', @_ ); | |||||||||||
| 191 | } | ||||||||||||
| 192 | |||||||||||||
| 193 | =item C<< optimistic_threshold_time >> | ||||||||||||
| 194 | |||||||||||||
| 195 | =cut | ||||||||||||
| 196 | |||||||||||||
| 197 | 0 | ▶ | sub optimistic_threshold_time { | ||||||||||
|
Subroutine
optimistic_threshold_time: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 198 | 0 | my $self = shift; | |||||||||||
| 199 | 0 | return $self->_get_value( 'optimistic_threshold_time', @_ ); | |||||||||||
| 200 | } | ||||||||||||
| 201 | |||||||||||||
| 202 | =item C<< delegate >> | ||||||||||||
| 203 | |||||||||||||
| 204 | =cut | ||||||||||||
| 205 | |||||||||||||
| 206 | 600 | ▶ | sub delegate { | ||||||||||
|
Subroutine
delegate: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 207 | 600 | my $self = shift; | |||||||||||
| 208 | 600 | return $self->_get_value( 'delegate', @_ ); | |||||||||||
| 209 | } | ||||||||||||
| 210 | |||||||||||||
| 211 | 4065 | ▶ | sub _get_value { | ||||||||||
|
Subroutine
_get_value: called CC=4 SCAR=15.5
| |||||||||||||
| 212 | 4065 | my $self = shift; | |||||||||||
| 213 | 4065 | my $key = shift; | |||||||||||
| 214 | 4065 | ▶ | if (@_) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 215 | 0 | $self->[0]{ $key } = shift; | |||||||||||
| 216 | 0 | return $self->[0]{ $key }; | |||||||||||
| 217 | } | ||||||||||||
| 218 | 4065 | foreach my $i (0 .. $#{ $self }) { | |||||||||||
| 219 | 4065 | ▶ | if (exists($self->[ $i ]{ $key })) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 220 | 4065 | return $self->[ $i ]{ $key }; | |||||||||||
| 221 | } | ||||||||||||
| 222 | } | ||||||||||||
| 223 | 0 | return; | |||||||||||
| 224 | } | ||||||||||||
| 225 | |||||||||||||
| 226 | 35 | 1; | |||||||||||
| 227 | |||||||||||||
| 228 | __END__ | ||||||||||||