view release on metacpan or search on metacpan
lib/DBIx/Class/DynamicDefault.pm view on Meta::CPAN
}
return $self->next::method(@_);
}
sub update {
my ($self, $upd) = @_;
$self->set_inflated_columns($upd) if $upd;
my %dirty = $self->get_dirty_columns;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Events.pm view on Meta::CPAN
$self->event( insert => { details => \%inserted } );
return $self;
};
sub update {
my ( $self, @args ) = @_;
# Do this here instead of letting our parent do it
# so that we can use get_dirty_columns.
$self->set_inflated_columns(@args) if @args;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/FromSledge.pm view on Meta::CPAN
}
return $rs->create($cols);
}
sub update_from_sledge {
my ($self, $page, $args) = @_;
croak "error detected at validator" if $page->valid->is_error;
for my $col ($self->result_source->columns) {
if ($page->valid->{PLAN}->{$col}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/FromValidators.pm view on Meta::CPAN
return $self->create($cols);
}
}
sub update_from_fv {
my ($self, $results, $args) = @_;
croak "pass me a form results object" unless blessed($results);
croak "pass me a object which can call 'success' and 'valid'"
unless $results->can('success') and $results->can('valid');
croak "has error on form" unless $results->success;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/FrozenColumns.pm view on Meta::CPAN
=head2 update
=cut
sub update {
my $self = shift;
$self->_dirty_frozen_columns(undef);
$self->next::method(@_);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/ResultSet/DateMethods1.pm view on Meta::CPAN
if $self->_resolved_attrs->{_DBICH_DM1};
return $self->next::method(@_);
}
sub update {
my $self = shift;
$self = $self->as_subselect_rs
if $self->_resolved_attrs->{_DBICH_DM1};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/I18NColumns.pm view on Meta::CPAN
=head2 update
Overloaded L<DBIx::Class::Row/update> to manage i18n columns cleanly.
=cut
sub update {
my $self = shift;
$self->next::method( @_ );
if ( $self->_i18n_column_row ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Indexed.pm view on Meta::CPAN
Sends the object to the indexer's C<update> method, if C<index_on_update> is true.
=cut
sub update {
my $self = shift;
my $result = $self->next::method( @_ );
if ( $self->index_on_update and my $indexer = $self->indexer ) {
$indexer->update( $self, @_ );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Indexer/WebService/Dezi.pm view on Meta::CPAN
Handles the insert operation.
=cut
sub update_or_create_document {
my $self = shift;
my $object = shift;
$self->setup_fields( ref $object );
$self->_dezi->index( $self->as_document( $object ), $object->id, $self->content_type );
lib/DBIx/Class/Indexer/WebService/Dezi.pm view on Meta::CPAN
Handles the update operation.
=cut
sub update {
my $self = shift;
my $object = shift;
return if $self->disabled;
$self->update_or_create_document( $object );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Indexer/WebService/Lucene.pm view on Meta::CPAN
Calls C<update_or_create_document>.
=cut
sub update {
my $self = shift;
my $object = shift;
$self->update_or_create_document( $object );
}
lib/DBIx/Class/Indexer/WebService/Lucene.pm view on Meta::CPAN
Will either update or add a document to the index, depending
on its existence in the index.
=cut
sub update_or_create_document {
my $self = shift;
my $object = shift;
my $index = $self->_obj;
$self->setup_fields( ref $object );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Indexer/WebService/Solr.pm view on Meta::CPAN
Calls C<update_or_create_document>.
=cut
sub update {
my $self = shift;
my $object = shift;
$self->update_or_create_document( $object );
}
lib/DBIx/Class/Indexer/WebService/Solr.pm view on Meta::CPAN
Will either update or add a document to the index.
=cut
sub update_or_create_document {
my $self = shift;
my $object = shift;
my $solr = $self->_obj;
$self->setup_fields( ref $object );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Journal.pm view on Meta::CPAN
}
}
## On update, copy row's new contents to AuditHistory
sub update {
my $self = shift;
my $ret = $self->next::method(@_);
$self->journal_log_update(@_);
return $ret
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Objects/Base.pm view on Meta::CPAN
my $accessor = class_name_to_private_accessor($parent);
$self->$accessor( $self->$relationship->result_source );
}
}
sub update {
my $self = shift;
foreach my $attribute ( $self->meta->get_all_attributes ) {
next
unless $attribute->does(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/OptimisticLocking.pm view on Meta::CPAN
croak "invalid optimistic_locking_strategy $strategy" unless exists $valid_strategies{$strategy};
return $class->_opt_locking_strategy_accessor(@args);
}
sub update {
my $self = shift;
my $upd = shift;
# we have to do this ahead of time to make sure our WHERE
# clause is computed correctly
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/PgLog.pm view on Meta::CPAN
$self->_store_changes( $action, $result, {}, \%column_data );
return $result;
}
sub update {
my $self = shift;
return $self->next::method(@_) if !$enabled;
my $stored_row = $self->get_from_storage;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/ResultSet/PhoneticSearch.pm view on Meta::CPAN
}
return $self->search( { $type => $query }, $attributes );
}
sub update_phonetic_columns {
my ($self) = @_;
my $i = 0;
my $source = $self->result_source;
foreach my $column ( $source->columns ) {
$i += $self->update_phonetic_column($column);
}
return $i;
}
sub update_phonetic_column {
my ( $self, $column ) = @_;
my $source = $self->result_source;
my $config = $source->column_info($column)->{phonetic_search};
my $i;
return 0 unless ($config);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Preview.pm view on Meta::CPAN
my $ret = $class->next::method(@_);
return $ret;
}
sub update {
my $self = shift;
# mark row as dirty
if ($self->result_source->schema->preview_active() && $self->result_source->can('is_preview_source')) {
$_[0] = {} unless ref $_[0];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Result/ExternalAttribute.pm view on Meta::CPAN
overdefinition of update function
=cut
sub update {
my ( $self, $rh_fields ) = @_;
my $klass = ref $self;
foreach my $rel ( keys %{ $klass->rh_klass_attribute_column } ) {
foreach my $col ( @{ $klass->rh_klass_attribute_column($rel)->{'columns'} } ) {
if ( defined $rh_fields->{$col} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Result/ProxyField.pm view on Meta::CPAN
re defined update to adapt object field before update
=cut
sub update
{
my $self = shift;
my $rh_attrs = $_[0];
if (defined $rh_attrs)
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Result/Validation.pm view on Meta::CPAN
Update is done only if validate method return true
=cut
sub update {
my $self = shift;
if ( my $columns = shift ) {
$self->set_inflated_columns($columns);
}
return $self->_try_next_method( $self->next::can, @_ );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/ResultSet/Void.pm view on Meta::CPAN
my $query = $self->___get_primary_or_unique_key($hash, $attrs);
my $exists = $self->exists($query);
$self->create($hash) unless $exists;
}
sub update_or_create {
my $self = shift;
return $self->next::method(@_) if (defined wantarray);
my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/SaltedPasswords.pm view on Meta::CPAN
}
}
return $self->next::method(@_);
}
## copy of insert
sub update {
my $self = shift;
if ( $self->salted_enabled
&& $self->is_column_changed( $self->salted_column ) )
{
my $salt;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Row/Slave.pm view on Meta::CPAN
Throw exception if called via slave C<result_source>s.
=cut
sub update {
my $self = shift;
$self->throw_exception(
"Can't update via result source \"" . $self->result_source->source_name .
"\". This is slave connection."
view all matches for this distribution
view release on metacpan or search on metacpan
inc/DBIx/Class/TimeStamp.pm view on Meta::CPAN
}
return $self->next::method(@_);
}
sub update {
my $self = shift;
my $now = $self->get_timestamp();
my %dirty = $self->get_dirty_columns();
my @columns = @{ $self->__column_timestamp_triggers()->{on_update} };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/SingletonRows.pm view on Meta::CPAN
my $row = $schema->...
my $row2 = update_and_return();
sub update_and_return {
my $row = $schema->...
$row->somefield("HLAGH");
$row->update();
return $row;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Valiant/Result.pm view on Meta::CPAN
return 1, $limit;
}
return 0, undef;
}
sub update {
my ($self, $upd) = @_;
my $context = delete($upd->{__context})||[];
my @context = ref($context)||'' eq 'ARRAY' ? @$context : ($context);
push @context, 'update' unless grep { $_ eq 'update' } @context;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Validation/Structure.pm view on Meta::CPAN
# Else do the normal insert
$self->next::method(@_);
}
}
sub update {
my $self = shift;
my $columns = shift;
$self->set_inflated_columns($columns) if $columns;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Validation.pm view on Meta::CPAN
=item update
=cut
sub update {
my $self = shift;
my $columns = shift;
$self->set_inflated_columns($columns) if $columns;
$self->validate if $self->validation_auto;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/VirtualColumns.pm view on Meta::CPAN
Overloaded method. L<DBIx::Class::Row/"update">
=cut
sub update {
my $self = shift;
my $attr = shift;
# Filter localized values
my ($virtual_attrs,$main_attrs) = $self->_virtual_filter($attr);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/WebForm.pm view on Meta::CPAN
=item $self->update_from_form($form)
=cut
sub update_from_form {
my $self = shift;
die "update_from_form cannot be called as a class method" unless ref $self;
__PACKAGE__->_run_update( $self, @_ );
}
view all matches for this distribution