NAME
DR::Tarantool::SyncClient - sync driver for tarantool
SYNOPSIS
my $client = DR::Tarantool::SyncClient->connect(
port => $tnt->primary_port,
spaces => $spaces
);
if ($client->ping) { .. };
my $t = $client->insert(
first_space => [ 1, 'val', 2, 'test' ], TNT_FLAG_RETURN
);
$t = $client->call_lua('luafunc' => [ 0, 0, 1 ], 'space_name');
$t = $client->select(space_name => $key);
$t = $client->update(space_name => 2 => [ name => set => 'new' ]);
$client->delete(space_name => $key);
METHODS
connect
Connects to tarantool.
Arguments
The same as "connect" in DR::Tarantool::AsyncClient exclude callback.
Returns a connector or croaks error.
Additional arguments
- raise_error
-
If true (default behaviour) the driver will throw exception for each error.
ping
The same as "ping" in DR::Tarantool::AsyncClient exclude callback.
Returns TRUE or FALSE if an error.
insert
The same as "insert" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened (if raise_error is true).
select
The same as "select" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened (if raise_error is true).
update
The same as "update" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened (if raise_error is true).
delete
The same as "delete" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened (if raise_error is true).
call_lua
The same as "call_lua" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened (if raise_error is true).
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/.