NAME

DR::Tarantool::Tuple - tuple container for DR::Tarantool

SYNOPSIS

my $tuple = new DR::Tarantool::Tuple([ 1, 2, 3]);
my $tuple = new DR::Tarantool::Tuple([ 1, 2, 3], $space);
my $tuple = unpack DR::Tarantool::Tuple([ 1, 2, 3], $space);


$tuple->next( $other_tuple );

$f = $tuple->raw(0);

$f = $tuple->name_field;

METHODS

new

Constructor.

my $t = DR::Tarantool::Tuple->new([1, 2, 3]);
my $t = DR::Tarantool::Tuple->new([1, 2, 3], $space);

unpack

Constructor.

my $t = DR::Tarantool::Tuple->unpack([1, 2, 3], $space);

raw

Returns raw data from tuple.

my $array = $tuple->raw;

my $field = $tuple->raw(0);

next

Appends or returns the following tuple.

iter

Returns iterator linked with the tuple.

AUTOLOAD

Each fields autoloads fields by their names that defined in space.

tuple iterators

new

my $iter = DR::Tarantool::Tuple::Iterator->new( $tuple );

count

Returns count of tuples in the iterator.

my $count = $iter->count;

reset

Resets iterator (see next method).

$iter->reset;

next

Returns next element from the iterator.

my $iter = $tuple->iter;

while(my $tuple = $iter->next) {
    ...
}

COPYRIGHT AND LICENSE

Copyright (C) 2011 Dmitry E. Oboukhov <unera@debian.org>
Copyright (C) 2011 Roman V. Nikolaev <rshadow@rambler.ru>

This program is free software, you can redistribute it and/or
modify it under the terms of the Artistic License.

VCS

The project is placed git repo on github: https://github.com/unera/dr-tarantool/.