module Aws::Record

Aws::Record is the module you include in your model classes in order to decorate them with the Amazon DynamoDB integration methods provided by this library. Methods you can use are shown below, in sub-modules organized by functionality.

@example A class definition using Aws::Record

class MyModel
  include Aws::Record
  string_attr     :uuid,    hash_key: true
  integer_attr    :post_id, range_key: true
  boolean_attr    :is_active
  datetime_attr   :created_at
  string_set_attr :tags
  map_attr        :metadata
end

Constants

VERSION

Public Class Methods

included(sub_class) click to toggle source

Usage of {Aws::Record} requires only that you include this module. This method will then pull in the other default modules.

@example

class MyTable
  include Aws::Record
  # Attribute definitions go here...
end
# File lib/aws-record/record.rb, line 52
def self.included(sub_class)
  sub_class.send(:extend, RecordClassMethods)
  sub_class.send(:include, Attributes)
  sub_class.send(:include, ItemOperations)
  sub_class.send(:include, DirtyTracking)
  sub_class.send(:include, Query)
  sub_class.send(:include, SecondaryIndexes)
end

Private Instance Methods

dynamodb_client() click to toggle source
# File lib/aws-record/record.rb, line 62
def dynamodb_client
  self.class.dynamodb_client
end