Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

NAME
DR::Tarantool::Spaces - spaces container SYNOPSIS
use DR::Tarantool::Spaces; my $s = new DR::Tarantool::Spaces({ 1 => { name => 'users', # space name default_type => 'STR', # undescribed fields fields => [ qw(login password role), { name => 'counter', type => 'NUM' }, { name => 'something', type => 'UTF8STR', }, { name => 'opts', type => 'JSON', } ], indexes => { 0 => 'login', 1 => [ qw(login password) ], 2 => { name => 'my_idx', fields => 'login', }, 3 => { name => 'my_idx2', fields => [ 'counter', 'something' ] } } }, 0 => { ... } }); my $f = $s->pack_field('users', 'counter', 10); my $f = $s->pack_field('users', 1, 10); # the same my $f = $s->pack_field(1, 1, 10); # the same my $ts = $s->pack_keys([1,2,3] => 'my_idx'); my $t = $s->pack_primary_key([1,2,3]); DESCRIPTION
The package describes all spaces that You use. It supports the following field types: NUM, NUM64, STR - standard tarantool <http://tarantool.org> types. UTF8STR - the same as STR, but string will be utf8-decoded after extracting from database. INT & INT64 - the same as NUM and NUM64, but contain signed values. JSON - the filed will be encoded by JSON::XS before inserting and decoded after extracting from database. METHODS
new my $spaces = DR::Tarantool::Spaces->new( $spaces ); space Returns space object by number or name. my $space = $spaces->space('name'); my $space = $spaces->space(0); pack_field packs one field before making database request my $field = $spaces->pack_field('space', 'field', $data); unpack_field unpacks one field after extracting data from database my $field = $spaces->unpack_field('space', 'field', $data); pack_tuple packs tuple before making database request my $t = $spaces->pack_tuple('space', [ 1, 2, 3 ]); unpack_tuple unpacks tuple after extracting data from database my $t = $spaces->unpack_tuple('space', @fields); SPACES methods new constructor use DR::Tarantool::Spaces; my $space = DR::Tarantool::Space->new($no, $space); name returns space name number returns space number pack_field packs field before making database request unpack_field unpacks field after extracting data from database pack_tuple packs tuple before making database request unpack_tuple unpacks tuple after extracting data from database 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-04 DR::Tarantool::Spaces(3pm)

Check Out this Related Man Page

RECINS(1)							   User Commands							 RECINS(1)

NAME
recins - insert records in a recfile SYNOPSIS
recins [OPTION]... [t TYPE] [-n NUM | -e EXPR | -q STR | -m NUM] [(-f STR -v STR]|[-R RECDATA)]... [FILE] DESCRIPTION
Insert new records in a rec database. -f, --field=STR field name; should be followed by a -v. -v, --value=STR field value; should be preceded by an -f. -r, --record=STR record that will be inserted in the file. --force insert the record even if it is violating record restrictions. --no-external don't use external descriptors. --no-auto don't insert auto generated fields. --verbose give a detailed report if the integrity check fails. -s, --password=STR encrypt confidential fields with the given password. --help print a help message and exit. --version show version and exit. Record selection options: -i, --case-insensitive make strings case-insensitive in selection expressions. -t, --type=TYPE operate on records of the specified type only. -e, --expression=EXPR selection expression. -q, --quick=STR select records with fields containing a string. -n, --number=NUM,... select specific records by position, with ranges. -R, --random=NUM select a given number of random records. If no FILE is specified then the command acts like a filter, getting the data from standard input and writing the result to standard out- put. AUTHOR
Written by Jose E. Marchesi. REPORTING BUGS
Report bugs to: bug-recutils@gnu.org GNU recutils home page: <http://www.gnu.org/software/recutils/> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2010, 2011, 2012 Jose E. Marchesi. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for recins is maintained as a Texinfo manual. If the info and recins programs are properly installed at your site, the command info recins should give you access to the complete manual. recins 1.4.93 January 2012 RECINS(1)
Man Page