Takuya Tsuchida > SQL-Executor > SQL::Executor::Iterator

Download:
SQL-Executor-0.17.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

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.

syntax highlighting: