Attean...SPARQL(3pm)
π AtteanX::Store::SPARQL β the Attean SPARQL store bestie π
okay so. this is a page from the perl manual (section 3pm, user contributed perl documentation, iykyk) and it's literally all about AtteanX::Store::SPARQL. buckle up, it's short and it's iconic β¨
πΈ SYNOPSIS πΈ
my $store = Attean->get_store('SPARQL')->new(endpoint_url => $url);
like. that's it. that's the whole vibe. one line and you're in π«Ά
β¨ DESCRIPTION β¨
so this thing implements a simple immutable triple store. "immutable" bestie, meaning it doesn't get changed, it's just there, looking cute, doing its job π
what it actually does is let us programmers use all the Attean facilities to query remote SPARQL endpoints. no cap, that's the whole point.
and not only that β this distribution also brings a corresponding AtteanX::Model::SPARQL, which lets query plans be made, plus an AtteanX::Plan::SPARQLBGP plan class. and that plan class contains a rudimentary cost estimate that tries to avoid sending Cartesian joins to remote endpoints if possible. lowkey smart, highkey helpful, fr fr π₯
π Attributes and methods π
endpoint_urlβ the URL of a remote SPARQL endpoint. it will be coerced into a URI object, so you can set it as a string or whatever, no stress. this one is a required attribute though, so don't ghost it πuaβ anLWP::UserAgentobject to use for remote queries. if you don't supply one it'll get set to a reasonable default. she's got you π«Άget_triplesβ the method that queries the remote endpoint, as required byAttean::API::TripleStore. periodt.count_triplesβ reimplemented using an aggregate query for greater efficiency. the glow up is real πget_sparql($sparql, [ $ua ])β this will submit the given$sparqlquery to theendpoint_urlattribute from above. optionally you may pass anLWP::UserAgent, and if you don't, it'll use the user agent set using theuamethod. and it will return an iterator with the results if the request is successful β
π BUGS π
please report any bugs to <https://github.com/kjetilk/p5-atteanx-store-sparql/issues>.
not me asking you to file an issueβ¦ but yes. do it. bestie behavior only π
π ACKNOWLEDGEMENTS π
this module is heavily influenced by RDF::Trine::Store::SPARQL. giving credit where credit is due, as one does π
π AUTHOR π
Kjetil Kjernsmo <kjetilk@cpan.org>.
π COPYRIGHT AND LICENCE π
this software is copyright (c) 2015, 2016 by Kjetil Kjernsmo and Gregory Todd Williams.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay π§
π DISCLAIMER OF WARRANTIES π
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
read it, feel it, respect it. no warranty, no cap, no take-backs π
and that's the whole page, bestie! this was perl v5.36.0, dated 2022-11-20, from the Attean...SPARQL(3pm) manual β tysm for reading, go query some endpoints, ily π¦π
π¦ where this page comes from
- debian bookworm: libatteanx-store-sparql-perl 0.012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libatteanx-store-sparql-perl 0.012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libatteanx-store-sparql-perl 0.012-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms