DBIx-Class-OptimisticLocking

 view release on metacpan or  search on metacpan

lib/DBIx/Class/OptimisticLocking.pm  view on Meta::CPAN

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
sub optimistic_locking_strategy {
        my @args = @_;
        my $class = shift(@args);
        my ($strategy) = $args[0];
        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
        $self->set_inflated_columns($upd) if($upd);
 
        # short-circuit if we're not changed
        return $self if !$self->is_changed;



( run in 0.253 second using v1.01-cache-2.11-cpan-87723dcf8b7 )