The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DBIx::Otogiri::Iterator - Iterator class for Otogiri

SYNOPSIS

use Otogiri;
my $db = Otogiri->new(connect_info => ['dbi:SQLite:...', '', '']);
my $iter = $db->select(book => {price => {'>=' => 500}});

while (my $row = $iter->next) {
    printf "Title: %s \nPrice: %s yen\n", $row->{title}, $row->{price};
}

printf "rows = %s\n", $iter->fetched_count;

DESCRIPTION

Iterator class for Otogiri. DO NOT USE THIS CLASS DIRECTLY.

METHODS

next

my $row = $iter->next;

Returns a row data as single hashref. Then, increment internal value "fetched_count".

fetched_count

my $count = $iter->fetched_count;

Returns a current "fetched_count".

LICENSE

Copyright (C) ytnobody.

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

AUTHOR

ytnobody <ytnobody@gmail.com>

SEE ALSO

DBIx::Otogiri