Module: Sequel::Plugins::IdentityMap::InstanceMethods
- Defined in:
- lib/sequel/plugins/identity_map.rb
Instance Method Summary collapse
-
#delete ⇒ Object
Remove instances from the identity map cache if they are deleted.
-
#merge_db_update(row) ⇒ Object
Merge the current values into the values provided in the row, ensuring that current values are not overridden by new values.
Instance Method Details
#delete ⇒ Object
Remove instances from the identity map cache if they are deleted.
84 85 86 87 88 89 90 |
# File 'lib/sequel/plugins/identity_map.rb', line 84 def delete super if idm = model.identity_map idm.delete(model.identity_map_key(pk)) end self end |
#merge_db_update(row) ⇒ Object
Merge the current values into the values provided in the row, ensuring that current values are not overridden by new values.
94 95 96 |
# File 'lib/sequel/plugins/identity_map.rb', line 94 def merge_db_update(row) @values = row.merge(@values) end |