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.
213 214 215 216 217 218 219 |
# File 'lib/sequel/plugins/identity_map.rb', line 213 def delete super if (idm = model.identity_map) && (k = model.identity_map_key(pk)) idm.delete(k) 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.
223 224 225 |
# File 'lib/sequel/plugins/identity_map.rb', line 223 def merge_db_update(row) @values = row.merge(@values) end |