Module: AWS::Record

Defined in:
lib/aws/record.rb,
lib/aws/record/model.rb,
lib/aws/record/scope.rb,
lib/aws/record/errors.rb,
lib/aws/record/naming.rb,
lib/aws/record/validator.rb,
lib/aws/record/attributes.rb,
lib/aws/record/conversion.rb,
lib/aws/record/exceptions.rb,
lib/aws/record/hash_model.rb,
lib/aws/record/model/scope.rb,
lib/aws/record/validations.rb,
lib/aws/record/abstract_base.rb,
lib/aws/record/dirty_tracking.rb,
lib/aws/record/hash_model/scope.rb,
lib/aws/record/model/attributes.rb,
lib/aws/record/validators/block.rb,
lib/aws/record/validators/count.rb,
lib/aws/record/validators/format.rb,
lib/aws/record/validators/length.rb,
lib/aws/record/validators/method.rb,
lib/aws/record/validators/presence.rb,
lib/aws/record/model/finder_methods.rb,
lib/aws/record/validators/exclusion.rb,
lib/aws/record/validators/inclusion.rb,
lib/aws/record/hash_model/attributes.rb,
lib/aws/record/validators/acceptance.rb,
lib/aws/record/validators/confirmation.rb,
lib/aws/record/validators/numericality.rb,
lib/aws/record/hash_model/finder_methods.rb

Overview

AWS::Record is an ORM built on top of AWS services.

Defined Under Namespace

Modules: AbstractBase, Attributes, DirtyTracking, Validations Classes: Errors, HashModel, Model, Scope

Constant Summary collapse

Base =

for backwards compatability with the old AWS::Record::Base

Model

Class Method Summary collapse

Class Method Details

.domain_prefixString?

Returns The string that is prepended to all domain names.

Returns:

  • (String, nil)

    The string that is prepended to all domain names.



48
49
50
# File 'lib/aws/record.rb', line 48

def self.domain_prefix
  @domain_prefix
end

.domain_prefix=(prefix) ⇒ Object

Sets a prefix to be applied to all SimpleDB domains associated with AWS::Record::Base classes.

AWS::Record.domain_prefix = 'production_'

class Product < AWS::Record::Base
  set_domain_name 'products'
end

Product.domain_name #=> 'production_products'

Parameters:

  • A (String)

    prefix to append to all domains. This is useful for grouping domains used by one application with a single prefix.



43
44
45
# File 'lib/aws/record.rb', line 43

def self.domain_prefix= prefix
  @domain_prefix = prefix
end

.table_prefixString?

Returns The string that is prepended to all table names.

Returns:

  • (String, nil)

    The string that is prepended to all table names.



72
73
74
# File 'lib/aws/record.rb', line 72

def self.table_prefix
  @table_prefix
end

.table_prefix=(prefix) ⇒ Object

Sets a prefix to be applied to all DynamoDB tables associated with HashModel and ListModel classes.

AWS::Record.table_prefix = 'production_'

class Product < AWS::Record::HashModel
  set_table_name 'products'
end

Product.table_name #=> 'production_products'

Parameters:

  • A (String)

    prefix to append to all tables. This is useful for grouping tables used by one application with a single prefix.



67
68
69
# File 'lib/aws/record.rb', line 67

def self.table_prefix= prefix
  @table_prefix = prefix
end