DBIx-Wrapper

 view release on metacpan or  search on metacpan

lib/DBIx/Wrapper.pm  view on Meta::CPAN

for the row(s) in the database.  The keys parameter can
optionally be an array ref instead of a hashref.  E.g.,

     $db->update($table, [ key1 => $val1, key2 => $val2 ], \%data);

This is so that the order of the parameters in the C<WHERE> clause
are kept in the same order.  This is required to use the correct
multi field indexes in some databases.

=cut
sub update {
    my ($self, $table, $keys, $data) = @_;

    if (defined($keys)) {
        unless ((UNIVERSAL::isa($keys, 'HASH') or UNIVERSAL::isa($keys, 'ARRAY'))) {
            return $self->setErr(-1, 'DBIx::Wrapper: No keys passed to update()');
        }
        
    }

    unless ($data and UNIVERSAL::isa($data, 'HASH')) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.233 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )