module Sequel::Plugins::OptimisticLocking::InstanceMethods
Private Instance Methods
Source
# File lib/sequel/plugins/optimistic_locking.rb 51 def _update_columns(columns) 52 lc = model.lock_column 53 lcv = get_column_value(lc) 54 new_lcv = columns[lc] = lcv + 1 55 super 56 set_column_value("#{lc}=", nil) 57 set_column_value("#{lc}=", new_lcv) 58 changed_columns.delete(lc) 59 nil 60 end
Only update the row if it has the same lock version, and increment the lock version.
Calls superclass method