Clear the instance filters when refreshing, so that attempting to refresh after a failed save removes the previous lock column filter (the new one will be added before updating).
# File lib/sequel/plugins/optimistic_locking.rb, line 72 72: def _refresh(ds) 73: clear_instance_filters 74: super 75: end
Only update the row if it has the same lock version, and increment the lock version.
# File lib/sequel/plugins/optimistic_locking.rb, line 79 79: def _update_columns(columns) 80: lc = model.lock_column 81: lcv = send(lc) 82: columns[lc] = lcv + 1 83: super 84: send("#{lc}=", lcv + 1) 85: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.