@private
@return [Hash] Returns just the hash key element and range key element
# File lib/aws/dynamo_db/keys.rb, line 29 def item_key_hash item item.table.assert_schema! key = {} key[:hash_key_element] = format_attribute_value(item.hash_value) key[:range_key_element] = format_attribute_value(item.range_value) if item.table.composite_key? key end
@return [Hash] Client options for identifying an item.
# File lib/aws/dynamo_db/keys.rb, line 23 def item_key_options(item, extra = {}) key = item_key_hash(item) extra.merge({ :table_name => item.table.name, :key => key }) end