DBIx-Frame
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
DBIx/Frame.pm view on Meta::CPAN
the (new) data from C<DATAHASH> for the updated values and the (old) data
from C<SELECTHASH> to determine which item to update. Note that the
search terms won't be empty unless you specifically specify them so. Uses
C<invoke()>.
If C<ALLOW_ADMIN> is set, then you may work with fields that are protected
by the C<ADMIN> array. (This doesn't actually work yet.)
=cut
sub update {
my ($self, $table, $datahash, $selecthash, $admin ) = @_;
my $db = _db_or_die($self) || return undef;
$self->_test_table($table) || $self->set_error("Bad table") && return undef;
my $hash = $self->_parse_hash($table, $datahash) || {};
my $select = $self->_make_select($table, $selecthash, 0, 1) || "";
unless ($select) {
my @return = keys %{$selecthash}; my $return = join(', ', @return);
$self->set_error("Couldn't get a selection out of $return");
return undef;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 2.149 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )