Attean...SPARQL(3pm)

πŸ“¦
version 0.012 Β· 4 versions
, in debian bookworm, ubuntu noble, ubuntu questing

πŸ’– 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 β€” an LWP::UserAgent object 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 by Attean::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 $sparql query to the endpoint_url attribute from above. optionally you may pass an LWP::UserAgent, and if you don't, it'll use the user agent set using the ua method. 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>.


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