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

NAME

SQL::Executor::Iterator - iterator for SQL::Executor

SYNOPSIS

  use DBI;
  use SQL::Executor;
  my $dbh = DBI->connect($dsn, $id, $pass);
  my $ex = SQL::Executor->new($dbh);
  #
  my $itr= $ex->select_named('SELECT id, value1 FROM SOME_TABLE WHERE value2 = :arg1', { arg1 => 'aaa' });

METHODS

new($sth, $table_name, $executor, $select_id)

$sth: DBI's statement handler $table_name: table name $executor: SQL::Executor object $select_id: select_id(UUID) this is used for to make Row object uniquely

next

return row hashref by default. if specified callback or table_callback option is specified in SQL::Executor::new(), callback will be called.

AUTHOR

Takuya Tsuchida <tsucchi {at} cpan.org>

SEE ALSO

SQL::Executor, DBI, SQL::Maker, DBIx::Simple

Codes for named placeholder is taken from Teng's search_named.

LICENSE

Copyright (C) Takuya Tsuchida

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