RDF::Query::Node(3pm)

✨ NAME ✨

RDF::Query::Node β€” the base class for RDF Nodes, bestie πŸ’– it's the mom of the whole node family.


🌸 VERSION 🌸

This doc describes RDF::Query::Node version 2.919. periodt. πŸ’…


πŸŽ€ METHODS πŸŽ€

okay so here's the group chat of methods this class is bringing:

  • is_variable β€” gives you true if this RDF node is a variable, and false otherwise. that's it, that's the vibe check βœ…
  • compare ( $a, $b ) β€” hands back -1, 0, or 1 depending on whether $a is less than, equal to, or greater than $b, and it does this according to the SPARQL sorting rules. no cap, those rules are the whole point πŸ”₯
  • from_trine ( $node ) β€” returns a fresh RDF::Query::Node object holding the same value as $node, which is an RDF::Trine::Node object. basically it promotes $node into a node object that has the extra functionality the RDF::Query package provides (think: SPARQL-defined ordering πŸ‘‘). glow-up fr fr ✨
  • from_attean ( $node ) β€” likewise, but this time the source is Attean πŸ¦‹
  • explain β€” returns a string serialization of the node, formatted so it looks right when you show it on the command line. this one is mainly used by the explain method on the subclasses of RDF::Query::Plan. iykyk 🫢

πŸ’œ FUNCTIONS πŸ’œ

and now the standalone functions, the main character energy section:

  • compare ( $node_a, $node_b ) β€” returns -1, 0, or 1 if $node_a sorts less than, equal to, or greater than $node_b in the defined SPARQL ordering, respectively. you can also hand this thing over as the function argument to <sort 🌈
  • iri ( $iri ) β€” returns an RDF::Query::Node::Resource object carrying the IRI value you gave it πŸ’–
  • blank ( $id ) β€” returns an RDF::Query::Node::Blank object with the identifier you passed in πŸŽ€
  • literal ( $value, $lang, $dt ) β€” returns an RDF::Query::Node::Literal object with your $value, plus an optional language and/or datatype ($lang / $dt) ⭐
  • variable ( $name ) β€” returns an RDF::Query::Node::Variable object with the variable name you handed it πŸ¦‹

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams <gwilliams@cpan.org> πŸ’Œ


and that's the whole page, bestie β€” written for perl v5.40.1, dated 2025-08-18, slay, go sort some nodes πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from