DR-Tarantool
view release on metacpan or search on metacpan
lib/DR/Tarantool/AsyncClient.pm view on Meta::CPAN
=item flags (optional)
Server flags, as described in perldoc L<DR::Tarantool/:constant>.
=item callback
=back
=cut
sub delete :method {
my $self = shift;
my $space = shift;
my $key = shift;
$self->_llc->_check_cb( my $cb = pop );
my $flags = shift || 0;
my $s = $self->space($space);
$self->_llc->delete(
$s->number,
$s->pack_primary_key( $key ),
$flags,
sub { _cb_default($_[0], $s, $cb) }
);
}
=head2 update
Update a tuple.
$client->update('space', 1, [ passwd => set => 'abc' ], sub { .. });
$client->update(
'space',
1,
[ [ passwd => set => 'abc' ], [ login => 'delete' ] ],
sub { ... }
);
=head3 Arguments
=over
=item space name
=item key
=item operation list
=item flags (optional)
Server flags, as described in perldoc L<DR::Tarantool/:constant>.
=item callback
=back
=cut
sub update {
my $self = shift;
my $space = shift;
my $key = shift;
my $op = shift;
$self->_llc->_check_cb( my $cb = pop );
my $flags = shift || 0;
my $s = $self->space($space);
$self->_llc->update(
$s->number,
$s->pack_primary_key( $key ),
$s->pack_operations( $op ),
$flags,
sub { _cb_default($_[0], $s, $cb) }
);
}
=head2 last_code
The error code returned by the last request
(see L<DR::Tarantool::LLClient/last_code>).
=cut
sub last_code { $_[0]->_llc->last_code }
=head2 last_error_string
The error message associated with the last request
(see L<DR::Tarantool::LLClient/last_error_string>), if
there was an error.
=cut
sub last_error_string { $_[0]->_llc->last_error_string }
=head1 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.
=head1 VCS
The project is placed git repo on github:
L<https://github.com/dr-co/dr-tarantool/>.
=cut
1;
( run in 1.742 second using v1.01-cache-2.11-cpan-39bf76dae61 )