| 1 | package AtteanX::Query::AccessPlan::SingleQuadBGP; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | our $AUTHORITY = 'cpan:KJETILK'; | ||
| 7 | our $VERSION = '0.012'; | ||
| 8 | |||
| 9 | use Moo::Role; | ||
| 10 | use AtteanX::Plan::SPARQLBGP; | ||
| 11 | |||
| 12 | around 'access_plans' => sub { | ||
| 13 | my $orig = shift; | ||
| 14 | my $self = shift; | ||
| 15 | my $model = shift; | ||
| 16 | my $active_graphs = shift; | ||
| 17 | my $pattern = shift; | ||
| 18 | my @plans = $orig->($self, $model, $active_graphs, $pattern, @_); | ||
| 19 | if ($pattern->does('Attean::API::TriplePattern')) { | ||
| 20 | my $sp = AtteanX::Plan::SPARQLBGP->new(children => [shift(@plans)], distinct => 0, ordered => []); | ||
| 21 | push(@plans, $sp); | ||
| 22 | } | ||
| 23 | return @plans; | ||
| 24 | }; | ||
| 25 | |||
| 26 | 1; | ||
| 27 | |||
| 28 | |||
| 29 | __END__ |