RDF::T...ataset(3pm)
π RDF::Trine::Model::Dataset β the manual page, but make it a group chat π
okay bestie, sit down, hydrate, and let's talk about RDF::Trine::Model::Dataset from the User Contributed Perl Documentation. It's a Model for SPARQL datasets, and it's giving very specific, very useful energy. Periodt.
πΈ VERSION πΈ
This doc describes RDF::Trine::Model::Dataset version 1.019. Noted. Screenshotted. In the notes app. π
π¨ STATUS π¨
bestie. listen. This module's API and functionality should be considered unstable. In the future, this module may change in backwards-incompatible ways, or be removed entirely. If you need the functionality this module provides, please get in touch β <http://www.perlrdf.org/>.
not me reading "removed entirely" and gasping π Use it, love it, but don't get too attached, yk? If you depend on it, go say hi at that link.
β¨ METHODS β¨
Beyond the methods documented below, this class inherits methods from the RDF::Trine::Model class. So there's lore beyond this page. iykyk.
π¦ new ( $model )
Returns a new dataset-model over the supplied model. Fresh out the box, wrapped in a bow. π
π¦ push_dataset ( default => \@graphs, named => \@graphs )
Creates a new dataset view over the underlying model. It's a push! Like a new layer, a new era, a new chapter. π
π¦ pop_dataset
Removes the last pushed dataset view. The way it justβ¦ undoes the push. Pop off, literally. π
π¦ temporary_model
Returns a new temporary (non-persistent) model. Here for a good time, not a long time. π§
π¦ add_hashref ( $hashref [, $context] )
Add triples represented in an RDF/JSON-like manner to the model. Hashref goes in, triples come out, that's the vibe. β¨
π¦ size
Returns the number of statements in the model. Just a number. Simple. Iconic. π
π¦ supports ( [ $feature ] )
If $feature is specified, returns true if the feature is supported by the underlying store, false otherwise. If $feature is not specified, returns a list of supported features. So it's either a yes/no bestie or a whole roster of what it can do. π«Ά
π¦ 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 β undef is the wildcard, the "I'm not picky" of arguments. π
π¦ add_statement ( $statement [, $context] )
Adds the specified $statement to the rdf store. Drop it in, bestie. π
π¦ remove_statement ( $statement [, $context])
Removes the specified $statement from the rdf store. And it's gone. No trace. π
π¦ remove_statements ( $subject, $predicate, $object [, $context] )
Removes all statements matching the supplied $statement pattern from the rdf store. Not one β all of them. It ate. π₯
π¦ get_statements ($subject, $predicate, $object [, $context] )
Returns an iterator of all statements matching the specified subject, predicate and objects from the rdf store. Any of the arguments may be undef to match any value. undef = match anything, we love a flexible queen. π
Okay and here's the important part, don't skip it:
- If three or fewer arguments are given, the statements returned will be matched based on triple semantics (the graph union of triples from all the named graphs).
- If four arguments are given (even if
$contextisundef), statements will be matched based on quad semantics (the union of all quads in the underlying store).
so likeβ¦ the number of args is the mode. no cap. β
π¦ get_pattern ( $bgp [, $context] [, %args ] )
Returns a stream object of all bindings matching the specified graph pattern. Streaming, matching, thriving. π
π¦ get_sparql ( $sparql )
Returns a stream object of all bindings matching the specified graph pattern. Yes, same description as the one above β that's just what the manual says, bestie, I don't make the rules, I just rewrite them with sparkles. π
π¦ get_graphs / get_contexts
Returns an iterator containing the nodes representing the named graphs in the model. Two names, one job, both slaying. π
π¦ model
Returns the underlying model object. The model behind the model. main character energy. β¨
π BUGS π
Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. (That phrasing is exactly what the manual says β "report β¦ to through" β and honestly? iconic in its own way. I'm keeping it. π)
π AUTHOR π
Gregory Todd Williams <gwilliams@cpan.org>
π COPYRIGHT π
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.
and that's the whole page, bestie. no sections skipped, no options dropped, every flag and default accounted for. we ate and left no crumbs. π β¨
perl v5.38.2 Β· 2024-01-13 β mwah, that's the version and date sign-off, take care of yourself, drink water, and don't use an unstable module in prod without a backup plan π«ΆπΈ
π¦ where this page comes from
- debian trixie: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms