GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DR::TARANTOOL::TUPLE (3)

.ds Aq ’

NAME

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

CONTENTS

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

A 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 the space).

Each tuple can contain references to next tuple and iterator, so that if the server returns more than one tuple, all of them can be accessed.

METHODS

    new

A constructor.



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



    unpack

Another way to construct a tuple.



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



    raw

Return raw data from the tuple.



    my $array = $tuple->raw;

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



    next

Append or return the next tuple, provided there is more than one tuple in the result set.



    my $next_tuple = $tuple->next;



    iter

Return an iterator object associated 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) If ’package’ and ’method’ are present, $iterator->next method constructs objects using $package->$method( $next_tuple )

If ’method’ is not present and ’package’ is present, the iterator blesses the raw array with ’package’.

    tail

Return the tail of the tuple (array of unnamed fields). The function always returns <B>ARRAYREFB> (as raw).

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/dr-co/dr-tarantool/>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DR::TARANTOOL::TUPLE (3) 2013-11-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.