module Minidynamo::Model::DynamoDBOverloads::InstanceMethods

Public Instance Methods

serialize_current(attr_name) click to toggle source
# File lib/minidynamo/model/dynamo_db_overloads.rb, line 67
def serialize_current attr_name
        serialized_value = attributes[attr_name]
        attr_object = self.class.attribute_for(attr_name)
        serialize_attribute attr_object, serialized_value
end

Private Instance Methods

dynamo_db_item() click to toggle source

@return [DynamoDB::Item] Returns a reference to the item as stored in

simple db.

obtain items ALSO if there’s a range key @api private

# File lib/minidynamo/model/dynamo_db_overloads.rb, line 78
def dynamo_db_item
        hash_value = serialize_current self.class.hash_key_attribute_name
        if self.class.range_key
                range_value = serialize_current self.class.range_key_attribute_name
                dynamo_db_table.items[hash_value, range_value]
        else
                dynamo_db_table.items[hash_value]
        end
end