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

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

πŸ’– RDF::Trine::Store::Hexastore β€” the perl manpage but make it cute πŸ’–

okay bestie, welcome to RDF::Trine::Store::Hexastore(3pm), a page from the User Contributed Perl Documentation section of the manual. yes the title got truncated to RDF::T...astore because manpages are dramatic like that, but we're doing the whole thing, no skips, periodt. ✨


🌸 VERSION 🌸

This document describes RDF::Trine::Store::Hexastore version 1.019. that's the vibe check result, locked in. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

the whole entire "how do I even start" moment:

use RDF::Trine::Store::Hexastore;

that's it. that's the synopsis. iconic, honestly. πŸ’…


✨ DESCRIPTION ✨

RDF::Trine::Store::Hexastore gives you an in-memory triple-store built on six-way indexing β€” the technique that got popularized by Hexastore. six ways of indexing everything so your lookups are fast. main character indexing energy, fr fr. πŸ”₯


πŸ‘‘ METHODS πŸ‘‘

so besides all the methods we're about to list below, this class also inherits methods from the RDF::Trine::Store class. family inheritance, we love to see it. 🫢

  • new () β€” hands you a brand new storage object. fresh out the box, no cap. 🌸
  • new_with_config ( $hashref ) β€” hands you a new storage object that's been configured using a hashref, with certain keys passed in as arguments.
the storetype key must be Hexastore for this backend. like, mandatory. non-negotiable. 🚨

This module can also initialize the store from a file or a URL, and in that case you can use a sources key. That key holds an arrayref of hashrefs. To load a file, you give the file name with a file key inside the hashref; to load a URL, use url. Check the example below bestie. On top of that, these keys are also available:

  • syntax β€” the syntax of the parsed file or URL.
  • base_uri β€” the base URI to be used for a parsed file.

Here's the example, and it sets up a Hexastore store from a local file and a remote URL at the same time. multitasking queen:

my $store = RDF::Trine::Store->new_with_config( {
    storetype => 'Hexastore',
    sources => [
        {
            file => 'test-23.ttl',
            syntax => 'turtle',
        },
        {
            url => 'http://www.kjetil.kjernsmo.net/foaf',
            syntax => 'rdfxml',
        }
]});
  • store ( $filename ) β€” writes the triples data out to a file specified by $filename. and the good news? that data can be read right back in later with the load method. round trip, slay. πŸ’Ύ
  • load ( $filename ) β€” returns a brand new Hexastore object with triples data pulled from the specified file. πŸ“
  • temporary_store β€” returns a temporary (empty) triple store. a lil blank canvas, a fresh start, we love her. ✨
  • get_statements ($subject, $predicate, $object [, $context] ) β€” returns a stream object of all the statements matching the subject, predicate and objects you specified. any of those arguments can be undef to match literally any value. wildcard behavior, we stan. πŸ’œ
  • get_pattern ( $bgp [, $context] ) β€” returns a stream object of all the bindings matching the specified graph pattern. πŸ¦‹
  • 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 list of the supported features instead. yes-or-no or the whole menu, your call. πŸ‘‘
  • get_contexts β€” (no description in the original, she's mysterious like that πŸ’€)
  • add_statement ( $statement [, $context] ) β€” adds the specified $statement to the underlying model. drop it in, bestie. 🌈
  • remove_statement ( $statement [, $context]) β€” removes the specified $statement from the underlying model. gone, bye. πŸ™ˆ
  • remove_statements ( $subject, $predicate, $object [, $context]) β€” removes the specified $statement from the underlying model. yes, the original really does say $statement here even though the signature lists subject/predicate/object β€” we report, we don't rewrite. πŸ’€
  • etag β€” returns an Etag suitable for use in an HTTP Header. headers but make it fashionable. πŸŽ€
  • nuke β€” permanently removes all the data in the store. all of it. every last triple. no undo button, no take-backs, this is not a drill. πŸ’₯
  • count_statements ($subject, $predicate, $object) β€” returns a count of all the statements matching the specified subject, predicate and objects. any of the arguments may be undef to match any value. counting era. ⭐

πŸ› BUGS πŸ›

please report any bugs or feature requests through the GitHub web interface at:

<https://github.com/kasei/perlrdf/issues>

tell them everything, they wanna know. πŸ’–


🌟 AUTHOR 🌟

Gregory Todd Williams "<gwilliams@cpan.org>". legend behavior. πŸ‘‘


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. legally iconic, fr. 🫢


okay that's the whole page, no details left behind, we ate and left no crumbs πŸ’…βœ¨ this was perl v5.38.2, dated 2024-01-13, and it lives in RDF::T...astore(3pm) β€” mwah, bye bestie! πŸŽ€πŸ’–πŸŒΈ

πŸ“¦ where this page comes from