lib/aws-record/record/secondary_indexes.rb
# Creates a local secondary index for the model. Learn more about Local
# Secondary Indexes in the
# {http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html Amazon DynamoDB Developer Guide}.
#
# @param [Symbol] name index name for this local secondary index
# @param [Hash] opts
# @option opts [Symbol] :range_key the range key used by this local
#   secondary index. Note that the hash key MUST be the table's hash
#   key, and so that value will be filled in for you.
# @option opts [Hash] :projection a hash which defines which attributes
#   are copied from the table to the index. See shape details in the
#   {http://docs.aws.amazon.com/sdkforruby/api/Aws/DynamoDB/Types/Projection.html AWS SDK for Ruby V2 docs}.
Creates a local secondary index for the model.
Creates a local secondary index for the model .
def _validate_required_lsi_keys(params)
          if params[:hash_key] && params[:range_key]
            _validate_attributes_exist(params[:hash_key], params[:range_key])
          else
            raise ArgumentError.new(
              "Local Secondary Indexes require a hash and range key!"
            )
          end
        end
def _validate_required_lsi_keys ( params ) if params [ :hash_key ] && params [ :range_key ] _validate_attributes_exist ( params [ :hash_key ] , params [ :range_key ] ) else raise ArgumentError . new ( "Local Secondary Indexes require a hash and range key!" ) end end
Creates a local secondary index for the model.
Creates a local secondary index for the model .
params
<not_specific>
<not_specific>
None
opts
<not_specific>
:projection a hash which defines which attributes are copied from the table to the index.
: projection a hash which defines which attributes are copied from the table to the index .