NAME

Tamino::Tran::Cursor - The Tamino driver's class implementing cursors.

SYNOPSIS

use Tamino;

my $tamino_client = Tamino->new(
    server      => '127.0.0.1/tamino'
    db          => 'mydb'
);

# $t will be a Tamino::Tran object                                 
my $t = $tamino_client->begin_tran
    or die $tamino_client->error;

$c = $t->xquery_cursor(q{
    for $x in collection('mycollection')/doctype/xxx[@yyy=%s][zzz='%s']
    return $x
}, "('y1','y2')", "z1") or die $t->error;

while($xml_bare_simple_tree = $c->fetch) {
    print XML::Simple::XMLout($xml_bare_simple_tree, KeyAttr => []);
}

$c->close;

DESCRIPTION

This is just an API wrapper. This driver is based on LWP::UserAgent, XML::Twig, and inherits from Class::Accessor and Class::Data::Inheritable.

CONSTRUCTOR

Constructor is called internally by Tamino::Tran class object.

METHODS

close

$c->close;

Close cursor

fetch

$xml = $c->fetch();
$xml = $c->fetch($num);
$xml = $c->fetch($num, $pos);

Fetch $num number of records from a cursor, startings from $pos position. If $pos is omitted, fetch from current position. If $num is omiited, fetch default number of records, which is set with $c->fetch_size($num)

fetch_size

Tamino::Tran::Cursor->fetch_size($num);
$c->fetch_size($num);