Module: Sequel::Plugins::UpdatePrimaryKey::InstanceMethods

Defined in:
lib/sequel/plugins/update_primary_key.rb

Instance Method Summary collapse

Instance Method Details

#after_updateObject

Clear the pk_hash and object dataset cache, and recache the pk_hash



35
36
37
38
39
# File 'lib/sequel/plugins/update_primary_key.rb', line 35

def after_update
  super
  @pk_hash = nil
  pk_hash
end

#pk_hashObject

Cache the pk_hash instead of generating it every time



42
43
44
# File 'lib/sequel/plugins/update_primary_key.rb', line 42

def pk_hash
  @pk_hash ||= super
end