Attean...luator(3pm)
π Attean::SimpleQueryEvaluator β the simple query evaluator that just gets you
okay so bestie, this is the manual page for Attean::SimpleQueryEvaluator, part of the Perl User Contributed Perl Documentation (that's the Attean...luator(3pm) energy up top, iykyk). Sit down, grab a strawberry π, we're learning about query evaluation.
β¨ NAME β¨
Attean::SimpleQueryEvaluator β literally the simple query evaluator. that's it. that's the name. iconic.
πΈ VERSION πΈ
This document describes Attean::SimpleQueryEvaluator version 0.035. yes, the doc has a version, and yes, it's 0.035. noted. π
π¦ SYNOPSIS π¦
okay so here's the whole vibe in code form β look at it, don't fear it:
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 );
that's it, that's the whole glow-up. you parse, you make an IRI, you build an evaluator with the model attribute, you call evaluate and boom π₯ you get an iterator. slay.
π DESCRIPTION π
The Attean::SimpleQueryEvaluator class implements a simple query evaluator. Like, what does it actually do? So glad you asked, bestie: give it an Attean::API::Algebra object and an Attean::API::Model object, and it evaluates the query that the algebra represents, using data from the model, and then returns a query result. that's the whole personality. no cap. π«Ά
π ATTRIBUTES π
these are the properties it's carrying around, main character energy only:
modelβ theAttean::API::Modelobject used for query evaluation. this is the data source, the moment, the whole point.default_graphβ theAttean::API::IRIobject representing the default graph in themodel. the default graph gets excluded from enumeration of graph names for query features likeGRAPH ?g {}β so don't expect it to show up in that list, it's too famous for that. πrequest_signerβ if set, this is used to modifyHTTP::Requestobjects used in evaluatingSERVICEcalls, before the request is made. what's it for? for things like adding cryptographic signature headers to the request, bestie. the modification happens by calling$request_signer->sign( $request ). so cute, so secure. π₯
π METHODS π
evaluate( $algebra, $active_graph )
Returns an Attean::API::Iterator object with the results produced by evaluating the query $algebra against the evaluator's model, using the supplied $active_graph. iterator in, iterator out, that's the flow β¨
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.
and here's the lil detail that matters, so pay attention π§: if the ground_blanks option is false, it replaces blank nodes in the pattern with fresh variables before evaluation, and populates %blanks with pairs ($variable_name => $variable_node). each new variable also gets appended to @new_vars as it's created. so @new_vars is the guest list, %blanks is the seating chart. π
new_service_client( $endpoint, $silent )
Returns a new Attean::SPARQLClient β for use in evaluating queries using the SPARQL Protocol against the given endpoint. remote queries, we love to see it. π
π BUGS π
Please report any bugs or feature requests through the GitHub web interface at <https://github.com/kasei/attean/issues>. do it, don't be shy, they want to hear from you π
π SEE ALSO π
yeah, this section is literally empty in the original. it's giving minimalist. it's giving "no references, only vibes." leaving it exactly as it is, bestie. β¨
π«Ά AUTHOR π«Ά
Gregory Todd Williams <gwilliams@cpan.org> β the icon, the legend, the person who made this whole thing happen. bow down π
β 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. read it, respect it, that's the rules ππ
aaand that's the whole page, bestie! this edition was brought to you by perl v5.40.0, dated 2025-01-26 β catch you on the next manpage, mwah πππΈ
π¦ where this page comes from
- debian trixie: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms