|
NAMEDR::Tarantool::MsgPack::AsyncClient - async client for tarantool.SYNOPSISuse DR::Tarantool::MsgPack::AsyncClient; DR::Tarantool::MsgPack::AsyncClient->connect( host => '127.0.0.1', port => 12345, spaces => $spaces, sub { my ($client) = @_; } ); $client->insert('space_name', [1,2,3], sub { ... }); Class methodsconnectConnect to <Tarantool:http://tarantool.org>, returns (by callback) an object which can be used to make requests.Arguments
Worker methodsAll methods accept callbacks which are invoked with the following arguments:
pingPing the server.$client->ping(sub { ... }); insert, replaceInsert/replace a tuple into a space.$client->insert('space', [ 1, 'Vasya', 20 ], sub { ... }); $client->replace('space', [ 2, 'Petya', 22 ], sub { ... }); call_luaCall Lua function.$client->call_lua(foo => ['arg1', 'arg2'], sub { }); selectSelect a tuple (or tuples) from a space by index.$client->select('space_name', 'index_name', [ 'key' ], %opts, sub { .. }); Options can be:
deleteDelete a tuple.$client->delete('space_name', [ 'key' ], sub { ... }); updateUpdate a tuple.$client->update('space', [ 'key' ], \@ops, sub { ... }); @ops is array of operations to update. Each operation is array of elements:
Visit the GSP FreeBSD Man Page Interface. |