Attean::SimpleQueryEvaluator - Simple query evaluator
Contents
Attributes
"model"
The Attean::API::Model object used for query evaluation.
"default_graph"
The Attean::API::IRI object representing the default graph in the "model". The default graph will be
excluded from enumeration of graph names for query features such as "GRAPH ?g {}".
"request_signer"
If set, used to modify HTTP::Request objects used in evaluating SERVICE calls before the request is
made. This may be used to, for example, add cryptographic signature headers to the request. The
modification is performed by calling "$request_signer->sign( $request )".
Bugs
Please report any bugs or feature requests to through the GitHub web interface at
<https://github.com/kasei/attean/issues>.
Copyright
Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
perl v5.40.0 2025-01-26 Attean::SimpleQueryEvaluator(3pm)
Description
The Attean::SimpleQueryEvaluator class implements a simple query evaluator that, given an
Attean::API::Algebra and a Attean::API::Model object, evaluates the query represented by the algebra
using data from the model, and returns a query result.
Methods
"evaluate( $algebra, $active_graph )"
Returns an Attean::API::Iterator object with results produced by evaluating the query $algebra
against the evaluator's "model", using the supplied $active_graph.
"evaluate_pattern( $pattern, $active_graph, \@new_vars, \%blanks )"
Returns an Attean::API::Iterator object with results produced by evaluating the triple- or quad-
pattern $pattern against the evaluator's "model", using the supplied $active_graph.
If the "ground_blanks" option is false, replaces blank nodes in the pattern with fresh variables
before evaluation, and populates %blanks with pairs ($variable_name => $variable_node). Each new
variable is also appended to @new_vars as it is created.
"new_service_client( $endpoint, $silent )"
Returns a new Attean::SPARQLClient for use in evaluating queries using the SPARQL Protocol against
the given endpoint.
Name
Attean::SimpleQueryEvaluator - Simple query evaluator
See Also
Synopsis
use v5.14;
use Attean;
my $algebra = Attean->get_parser('SPARQL')->parse('SELECT * WHERE { ... }');
my $active_graph = Attean::IRI->new('http://example.org/');
my $e = Attean::SimpleQueryEvaluator->new( model => $model );
my $iter = $e->evaluate( $algebra, $active_graph );
Version
This document describes Attean::SimpleQueryEvaluator version 0.035
