Module: Tarantool::Model::Locking
- Extended by:
- ActiveSupport::Concern
- Included in:
- Tarantool::Model
- Defined in:
- tarantool-model/lib/tarantool/model/locking.rb
Overview
Optimistic locking on the attribute named by locking_column, when the model declares it. An update compares the stored version with the record's and bumps it, inside a transaction on storages that have them, so a concurrent commit on the same row surfaces as StaleObjectError instead of being overwritten.