The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Webservice::InterMine::ResultIterator - An object for iterating through result rows

SYNOPSIS

  my $query = get_query_from_somewhere();
  my $iter = $query->result_iterator;
  while (defined (my $hashref = $iter->hashref)) {
    # do something with hashref
  }

DESCRIPTION

This package provides objects for iterating through result sets, where those result sets are rows from a database query.

ATTRIBUTES

connection [ro]

A Net::HTTP connection to the source of results

content [ro]

A Glob with content. Can be a glob linked to any file-handle or other IO.

error_code [ro]

The error code from the request, if any.

error_message [ro]

The error message from the request, if any.

csv [ro]

The CSV parser used to parse CSV/TSV lines.

view_list [ro]

The list of paths in the view for the query that was run.

METHODS

[Bool] is_success

Returns true if the server responded with a success-y status.

[Bool] is_error

Returns true if the server responded with an error-ish status.

[Str] status_line

Returns a human readable status line.

[Str] string

returns the next line as a string.

[Str] arrayref

returns the next line as an arrayref.

[Str] hashref

returns the next line as a hashref

[List] all_lines( format )

Returns all the lines, in the desired format (string/arrayref/hashref).

SEE ALSO

AUTHOR

Alex Kalderimis <dev@intermine.org>

BUGS

Please report any bugs or feature requests to dev@intermine.org.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Webservice::InterMine::ResultIterator

You can also look for information at:

COPYRIGHT AND LICENSE

Copyright 2006 - 2011 FlyMine, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.