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

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

πŸ’– NAME πŸ’–

RDF::Trine::Iterator::Bindings::Materialized β€” the materialized bindings class, bestie. that's it, that's the whole vibe ✨


πŸŽ€ VERSION πŸŽ€

this doc is describing RDF::Trine::Iterator::Bindings::Materialized version 1.019 πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the whole thing in action, copy it exactly, no edits queen:

use RDF::Trine::Iterator;

my $iterator = RDF::Trine::Iterator::Bindings::Materialized->new( \@data, \@names );
while (my $row = $iterator->next) {
    my @vars        = keys %$row;
    # do something with @vars
}

my $iterator = RDF::Trine::Iterator::Bindings->new( \&code, \@names );
my $miter = $iterator->materialize;
while (my $row = $miter->next) {
    my @vars        = keys %$row;
    # do something with @vars
}
$miter->reset; # start the iteration again
while (my $row = $miter->next) {
    # ...
}

see that? you can spin one up directly with new, or you can grab a lazy bindings iterator and hit materialize on it, and then rewind with reset and go again πŸ” iconic behavior honestly


πŸ¦‹ METHODS πŸ¦‹

not me listing every single one… but also yes, every single one, because you deserve the full tea πŸ’œ

on top of the methods written down below, this class inherits methods from the RDF::Trine::Iterator::Bindings class β€” so go look there too, iykyk

  • new ( \@results, \@names, %args ) β€” hands you back a brand-new materialized bindings iterator 🫢 the results have to be a reference to an array, and inside that array are the individual results. \@names and %args ride along too, no cap.
  • reset β€” sends the iterator all the way back to where it started, like a rewind button on the group chat πŸ“Ό
  • next β€” gives you the next item in the iterator. the main character method, fr fr πŸ‘‘
  • length β€” tells you how many elements are chillin' in the iterator πŸ”’

πŸ’€ BUGS πŸ’€

found a bug? need a feature? please report it through the GitHub web interface at:

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

go off, they wanna hear it πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams β€” "<gwilliams@cpan.org>" ✨ the legend himself


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.

yes bestie, that means it's free software under the same terms as Perl itself β€” slay, go forth and redistribute πŸ’–

and that's a wrap on RDF::T...alized 🌈 this page was brought to you by perl v5.38.2, dated 2024-01-13, from the User Contributed Perl Documentation collection πŸŽ€ bye bestie, go materialize something gorgeous πŸ¦‹β­

πŸ“¦ where this page comes from