DBIx-EAV
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/DBIx/EAV/Entity.pm view on Meta::CPAN
# adopt data
for (keys %$data) {
$raw->{$_} = $data->{$_};
$total++;
}
# return the number os attrs loaded
$total;
}
sub update {
my $self = shift;
$self->set(@_)->save;
}
sub set {
my $self = shift;
my $numargs = scalar(@_);
die 'Call set(\%data) or set($attr, $value)'
if 1 > $numargs || $numargs > 2;
lib/DBIx/EAV/ResultSet.pm view on Meta::CPAN
my @result;
foreach my $item (@$data) {
push @result, $self->insert($item);
}
return wantarray ? @result : \@result;
}
sub update {
my ($self, $data, $where) = @_;
$where //= {};
$where->{entity_type_id} = $self->type->id;
# do a direct update for static attributes
}
lib/DBIx/EAV/Table.pm view on Meta::CPAN
if ($rv == 1) {
return $self->_dbh->last_insert_id(undef, undef, undef, undef) || 1;
}
else {
$rv;
}
}
sub update {
my ($self, $data, $where) = @_;
$where = $self->_mangle_where($where);
my ($stmt, @bind) = $sql->update($self->name, $data, $where);
my ($rv, $sth) = $self->_do($stmt, \@bind);
$rv;
}
sub delete {
my ($self, $where, $opts) = @_;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.636 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )