RDF::Trine::Iterator::Bindings(3pm) | User Contributed Perl Documentation | RDF::Trine::Iterator::Bindings(3pm) |
RDF::Trine::Iterator::Bindings - Iterator class for bindings query results
This document describes RDF::Trine::Iterator::Bindings version 1.019
use RDF::Trine::Iterator::Bindings; my $iterator = RDF::Trine::Iterator::Bindings->new( \&data, \@names ); while (my $row = $iterator->next) { # $row is a HASHref containing variable name -> RDF Term bindings my @vars = keys %$row; print $row->{ 'var' }->as_string; }
Beyond the methods documented below, this class inherits methods from the RDF::Trine::Iterator class.
Note that the values from the $inner iterator are fully materialized for this join, and the results of the join are in the order of values from the $outer iterator. This suggests that:
* If sorting needs to be preserved, the $outer iterator should be used to determine the result ordering.
* If one iterator is much smaller than the other, it should likely be used as the $inner iterator since materialization will require less total memory.
If $pattern, an RDF::Trine::Pattern object, is given as an argument, each of its triples are instantiated with variable bindings from each row of the iterator, and returned as RDF::Trine::Statement objects from a new RDF::Trine::Iterator::Graph iterator.
If 3 variable @names are supplied, their corresponding variable bindings in each row of the iterator are used (in order) as the subject, predicate, and object of new RDF::Trine::Statement objects and returned from a new RDF::Trine::Iterator::Graph iterator.
JSON
Scalar::Util
Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>.
Gregory Todd Williams "<gwilliams@cpan.org>"
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.
2022-12-12 | perl v5.36.0 |