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
-
.domain_prefix ⇒ String?
The string that is prepended to all domain names.
-
.domain_prefix=(prefix) ⇒ Object
Sets a prefix to be applied to all SimpleDB domains associated with AWS::Record::Base classes.
-
.table_prefix ⇒ String?
The string that is prepended to all table names.
-
.table_prefix=(prefix) ⇒ Object
Sets a prefix to be applied to all DynamoDB tables associated with HashModel and ListModel classes.
Class Method Details
.domain_prefix ⇒ String?
Returns The string that is prepended to all domain names.
51 52 53 |
# File 'lib/aws/record.rb', line 51 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_shard_name 'products'
end
p = Product.new
p.shard #=> 'products'
p.save # the product is persisted to the 'production-products' domain
46 47 48 |
# File 'lib/aws/record.rb', line 46 def self.domain_prefix= prefix @domain_prefix = prefix end |
.table_prefix ⇒ String?
Returns The string that is prepended to all table names.
78 79 80 |
# File 'lib/aws/record.rb', line 78 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_shard_name 'products'
end
p = Product.new
p.shard #=> 'products'
p.save # the product is persisted to the 'production-products' table
73 74 75 |
# File 'lib/aws/record.rb', line 73 def self.table_prefix= prefix @table_prefix = prefix end |