class Dyna::DSL::DynamoDB::Table::LocalSecondaryIndex
Attributes
result[RW]
Public Class Methods
new()
click to toggle source
# File lib/dyna/dsl/table.rb, line 117 def initialize @result = Hashie::Mash.new end
Public Instance Methods
key_schema(hash:, range: nil)
click to toggle source
# File lib/dyna/dsl/table.rb, line 121 def key_schema(hash:, range: nil) @result.key_schema = [{ attribute_name: hash, key_type: 'HASH', }] if range @result.key_schema << { attribute_name: range, key_type: 'RANGE', } end end
projection(projection_type:, non_key_attributes: nil)
click to toggle source
# File lib/dyna/dsl/table.rb, line 135 def projection(projection_type:, non_key_attributes: nil) @result.projection = { projection_type: projection_type, non_key_attributes: non_key_attributes, } end