Tamino::Tran::Cursor - The Tamino driver's class implementing cursors.
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;
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 is called internally by Tamino::Tran class object.
$c->close;
Close cursor
$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)
$c->fetch_size($num)
Tamino::Tran::Cursor->fetch_size($num); $c->fetch_size($num);
To install Tamino, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tamino
CPAN shell
perl -MCPAN -e shell install Tamino
For more information on module installation, please visit the detailed CPAN module installation guide.