Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dr::tarantool::tuple(3pm) [debian man page]

DR::Tarantool::Tuple(3pm)				User Contributed Perl Documentation				 DR::Tarantool::Tuple(3pm)

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; DESCRIPTION
Tuple contains normalized (unpacked) fields. You can access the fields by their indexes (see raw function) or by their names (if they are described in space). Each tuple can contain references to next tuple and iterator. So If You extract more than one tuple, You can access them. 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. my $next_tuple = $tuple->next; iter Returns iterator linked with the tuple. my $iterator = $tuple->iter; my $iterator = $tuple->iter('MyTupleClass', 'new'); while(my $t = $iterator->next) { # the first value of $t and $tuple are the same ... } Arguments package (optional) method (optional, default: new) if 'package' and 'method' are present, $iterator->next method will construct objects using "$package->$method( $next_tuple )" AUTOLOAD Each tuple autoloads fields by their names that defined in space. my $name = $tuple->password; # space contains field with name 'password' my $name = $tuple->login; ... tuple iterators new my $iter = DR::Tarantool::Tuple::Iterator->new( $tuple ); my $iter = $tuple->iter; # the same Arguments tuple package (optional) method (optional, default: new) if 'package' and 'method' are present, next method will construct objects using "$package->$method( $next_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/ <https://github.com/unera/dr-tarantool/>. perl v5.14.2 2012-06-06 DR::Tarantool::Tuple(3pm)

Check Out this Related Man Page

DR::Tarantool(3pm)					User Contributed Perl Documentation					DR::Tarantool(3pm)

NAME
DR::Tarantool - perl driver for tarantool <http://tarantool.org> SYNOPSIS
use DR::Tarantool ':constant', 'tarantool'; use DR::Tarantool ':all'; my $tnt = tarantool host => '127.0.0.1', port => 123, spaces => { ... } ; $tnt->update( ... ); my $tnt = coro_tarantool host => '127.0.0.1', port => 123, spaces => { ... } ; use DR::Tarantool ':constant', 'async_tarantool'; async_tarantool host => '127.0.0.1', port => 123, spaces => { ... }, sub { ... } ; $tnt->update(...); DESCRIPTION
The module provides sync and async drivers for tarantool <http://tarantool.org>. The driver uses libtarantool* libraries for making requests and parsing responses. EXPORT
tarantool connects to tarantool <http://tarantool.org> in sync mode using DR::Tarantool::SyncClient. async_tarantool connects to tarantool <http://tarantool.org> in async mode using DR::Tarantool::AsyncClient. coro_tarantol connects to tarantool <http://tarantool.org> in async mode using DR::Tarantool::CoroClient. :constant Exports constants to use in request as flags: TNT_FLAG_RETURN If You use the flag, driver will return tuple that were inserted/deleted/updated. TNT_FLAG_ADD Try to add tuple. Return error if tuple is already exists. TNT_FLAG_REPLACE Try to replace tuple. Return error if tuple isn't exists. :all Exports all functions and constants. SEE ALSO
The module uses DR::Tarantool::SyncClient and (or) DR::Tarantool::AsyncClient. 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/ <https://github.com/unera/dr-tarantool/>. perl v5.14.2 2012-06-06 DR::Tarantool(3pm)
Man Page