Robin Smidsrød > DBIx-Iterator-0.0.2 > DBIx::Iterator::Statement

Download:
DBIx-Iterator-0.0.2.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0.2   Source  

NAME ^

DBIx::Iterator::Statement - Query your database using iterators and save memory

VERSION ^

version 0.0.2

METHODS ^

new($query, $db)

Creates a database statement object that can be used to bind parameters and execute the query.

db

Returns the database object specified in the constructor.

sth

Returns the DBI statement handle associated with the prepared statement.

bind_param(@args)

Specifies bind parameters for the query as defined in "bind_param" in DBI.

execute(@placeholder_values)

Executes the prepared query with the optional placeholder values. Returns a code reference you can execute until it is exhausted. If called in list context, it will also return a reference to the statement object itself. The iterator returns exactly what "fetchrow_hashref" in DBI returns. When the iterator is exhausted it will return undef.

AUTHOR ^

Robin Smidsrød <robin@smidsrod.no>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Robin Smidsrød.

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

syntax highlighting: