RDF::T...:SPARQL(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– RDF::Trine::Store::SPARQL πŸ’–

okay bestie, so this page is from the User Contributed Perl Documentation and it's all about RDF::Trine::Store::SPARQL, no cap. pull up a chair, we're doing this. 🫢


✨ NAME ✨

RDF::Trine::Store::SPARQL β€” it's an RDF Store proxy for a SPARQL endpoint. literally the middleman of your dreams. πŸ’…


🌸 VERSION 🌸

this doc describes RDF::Trine::Store::SPARQL version 1.019. that's the one, fr fr.


πŸ¦‹ SYNOPSIS πŸ¦‹

use RDF::Trine::Store::SPARQL;

that's it. that's the whole vibe check. two words and a semicolon. iconic. ✨


πŸ’œ DESCRIPTION πŸ’œ

so like, RDF::Trine::Store::SPARQL gives you an RDF::Trine::Store API so you can go talk to a remote SPARQL endpoint. it's giving "proxy but make it classy". you get the familiar store interface, the endpoint does the actual work, everybody wins. πŸŽ€


πŸ‘‘ METHODS πŸ‘‘

bestie, real talk: beyond the methods listed down here, this class also inherits methods from the RDF::Trine::Store class. so there's more where that came from. 🌈

  • new ( $url ) β€” hands you a brand new storage object that acts as a proxy for the SPARQL endpoint you can reach at the $url you passed in. slay. πŸ’–
  • new_with_config ( $hashref ) β€” hands you a new storage object, built from a hashref with certain keys passed as arguments.

the storetype key must be SPARQL for this backend. no substitutions, that's the rule. 🚨

and you also gotta use this key:

  • url β€” the URL of the remote endpoint. that's where the whole thing lives.
  • new_with_config ( \%config ) β€” hands you a new RDF::Trine::Store object based on the configuration hashref you supplied. yes, same method name, different arg shape. it's flexible like that. πŸ’…
  • get_statements ( $subject, $predicate, $object [, $context] ) β€” returns a stream object of all the statements matching the subject, predicate and objects you asked for. any of the arguments can be undef and that means "match any value". so undef is basically the wildcard card. πŸƒ
  • get_pattern ( $bgp [, $context] ) β€” returns an iterator object of all the bindings matching the graph pattern you specified.
  • get_contexts β€” returns an RDF::Trine::Iterator over the RDF::Trine::Node objects that make up the set of contexts of the stored quads. contexts, but make it a whole iterator. 🌸
  • add_statement ( $statement [, $context] ) β€” adds the $statement you gave it to the underlying model. new statement, who dis. πŸ’–
  • remove_statement ( $statement [, $context]) β€” removes the $statement you gave it from the underlying model. bye bestie. πŸ‘‹
  • remove_statements ( $subject, $predicate, $object [, $context]) β€” removes the $statement from the underlying model. (yes, the doc says $statement here even though the args are subject/predicate/object β€” we don't ask questions, we just report the facts. πŸ™ˆ)
  • count_statements ( $subject, $predicate, $object, $context ) β€” returns a count of every statement matching the subject, predicate, object and context you specified. any of the arguments can be undef to match any value. math, but cute. πŸ”’
  • size β€” returns the number of statements in the store. how big is the fit? this tells you. πŸ“
  • supports ( [ $feature ] ) β€” if you pass $feature, it returns true when the store supports that feature and false when it doesn't. if you don't pass $feature, it returns a whole list of the supported features instead. either way you're getting answers. ⭐
  • get_sparql ( $sparql ) β€” returns an iterator object of all the bindings matching the SPARQL query you specified. this is the one that speaks fluent SPARQL, iykyk. πŸ”₯

πŸ’€ BUGS πŸ’€

found a bug? got a feature request? pls pls pls report it through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. they wanna hear from you, genuinely. don't be shy. 🫢


🌟 AUTHOR 🌟

Gregory Todd Williams "<gwilliams@cpan.org>" β€” the icon, the legend, the main character who wrote this. πŸ‘‘


Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

so yeah β€” free software, same terms as Perl, go wild (responsibly). πŸ’œ


and that's the whole page, bestie!! this was RDF::T...:SPARQL(3pm) from the User Contributed Perl Documentation, generated with perl v5.38.2 on 2024-01-13. go forth and proxy your SPARQL endpoints, you absolute legend. mwah. πŸ’…βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from