DBIx-Class-OptimisticLocking
view release on metacpan or search on metacpan
lib/DBIx/Class/OptimisticLocking.pm view on Meta::CPAN
2223242526272829303132333435363738394041sub
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 )