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 β€” the Attean::API::Model object used for query evaluation. this is the data source, the moment, the whole point.
  • default_graph β€” the Attean::API::IRI object representing the default graph in the model. the default graph gets excluded from enumeration of graph names for query features like GRAPH ?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 modify HTTP::Request objects used in evaluating SERVICE calls, 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 (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