module Dynamoid::Indexes
Indexes
are quick ways of performing queries by anything other than id in DynamoDB. They are denormalized tables; that is, data is duplicated in the initial table (where the object is saved) and the index table (where we perform indexing).
Public Instance Methods
delete_indexes()
click to toggle source
Callback for an object to delete itself from each of a class' indexes.
@since 0.2.0
# File lib/dynamoid/indexes.rb, line 62 def delete_indexes self.class.indexes.each do |name, index| index.delete(self) end end
save_indexes()
click to toggle source
Callback for an object to save itself to each of a class' indexes.
@since 0.2.0
# File lib/dynamoid/indexes.rb, line 53 def save_indexes self.class.indexes.each do |name, index| index.save(self) end end