DBIx::Class::Helper::Row::ProxyResultSetUpdate(3pm)

DBIx::Class::Helper::Row::ProxyResultSetUpdate3pm

Efficiently reuse resultset updates from results

Usage

ResultSet:

 package MyApp::Schema::ResultSet::Foo;
 use parent 'DBIx::Class::ResultSet';
 sub update {
    my ($self, $data) = @_;
    die 'you fool!' if $data->{name} eq 'fool';
    return $self->next::method($data);
 }

Result:

 package MyApp::Schema::Result::Foo;
 use parent 'DBIx::Class::Core';
 __PACKAGE__->load_components(qw( Helper::Row::ProxyResultSetUpdate ));
 ...

or with DBIx::Class::Candy:

 package MyApp::Schema::Result::Foo;
 use DBIx::Class::Candy -components => ['Helper::Row::ProxyResultSetMethod'];
 ...

Overview

This module makes reusing resultset updates from a result trivially easy. Often the only way that people share update methods is by overriding update in their resultset to use "update_all" in DBIx::Class::ResultSet. Unfortunately, that can end up being wildly inefficient. Instead, if you can write your update in terms of the resultset, you can make your code much faster and more efficient.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Author

Arthur Axel "fREW" Schmidt <[email protected]>

From libdbix-class-helpers-perl 2.037000-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.