aws-sdk-ruby-record

Official repository for the aws-record gem, an abstraction for Amazon DynamoDB.

APACHE-2.0 License

Downloads
13.8M
Stars
319
Committers
22

Bot releases are visible (Hide)

aws-sdk-ruby-record - Release v1.1.1 - 2017-06-16

Published by awood45 over 7 years ago

References: #71

  • Feature - Support lambdas for default attribute values.

    date_attr :date, default_value -> { Date.today }
    
  • Issue - An attribute's default_value could be modified and carried over to
    new instances of the model. With this change, default values are deep copied,
    and are hydrated at item creation to ensure correct persistence of mutable
    objects.

    See related GitHub issue #69

aws-sdk-ruby-record - Release v1.1.0 - 2017-04-21

Published by awood45 over 7 years ago

References: #51, #52, #64

  • Feature - Aws::Record::TableConfig - A declarative way to describe
    configuration for your Amazon DynamoDB tables, with smart migrations based on
    the current remote state. More details in the documentation.

  • Issue - Aws::Record::TableMigration - Legacy table migrations could have
    issues with global secondary indexes if a table was deleted and recreated
    multiple times.

    See related GitHub issue #64.

aws-sdk-ruby-record - Release v1.0.3 - 2016-12-19

Published by awood45 almost 8 years ago

References: #38, #46, #49

  • Feature - Aws::Record::ItemOperations - Adds the find_with_opts class method
    to model instances, which allows users to pass in both the key (as in find)
    and parameters which are to be passed through to the underlying
    Aws::DynamoDB::Client#get_item call.
aws-sdk-ruby-record - Release v1.0.2 - 2016-12-02

Published by awood45 almost 8 years ago

References: #43

  • Issue - Aws::Record::ItemOperations - Fixes an issue where update operations
    which consist of only REMOVE expressions failed due to an empty
    :expression_attribute_values map. The fix makes the presence of that map
    conditional on the existance of valid values.
aws-sdk-ruby-record - Release v1.0.1 - 2016-08-24

Published by awood45 about 8 years ago

References: #32, #36

  • Issue - Aws::Record::ItemCollection - Fixes a faulty #empty? implementation,
    which could return false for a response which is, in fact, empty.
aws-sdk-ruby-record - Release v1.0.0 - 2016-08-15

Published by awood45 about 8 years ago

  • Issue - Aws::Record - Fixes the #table_exists? and #provisioned_throughput
    methods, which could fail if called before #table_name.
aws-sdk-ruby-record - Release v1.0.0.pre.10 - 2016-08-03

Published by awood45 about 8 years ago

References: #30

  • Feature - Aws::Record - Refactored tracking of model attributes, key attributes,
    and item data to use internal classes over module composition. Dirty tracking is
    also handled more consistently across attributes, and turning on/off of dirty
    tracking is only possible at the model level (not for individual attributes).
aws-sdk-ruby-record -

Published by awood45 about 8 years ago

aws-sdk-ruby-record -

Published by awood45 about 8 years ago

aws-sdk-ruby-record -

Published by awood45 about 8 years ago

aws-sdk-ruby-record -

Published by awood45 about 8 years ago

aws-sdk-ruby-record -

Published by awood45 about 8 years ago

aws-sdk-ruby-record -

Published by awood45 about 8 years ago

aws-sdk-ruby-record - Release v1.0.0.pre.9 - 2016-07-22

Published by awood45 about 8 years ago

References: #26, #27, #28, #29

  • Feature - Aws::Attribute - Added support for default values at the attribute
    level.

  • Feature - Aws::Marshalers - Removed the marshalers in the Aws::Attributes
    namespace, replacing them with instantiated marshaler objects. This enables
    more functionality in marshalers such as the Date/DateTime marshalers.

  • Feature - Aws::Record::DirtyTracking - Improves dirty tracking by adding
    support for tracking mutations of attribute value objects. This feature is on
    by default for the "collection" types: :list_attr, :map_attr,
    :string_set_attr, and :numeric_set_attr.

    Before this feature, the #save method's default behavior of running an
    update call for dirty attributes only could cause problems for users of
    collection attributes. As many of them are commonly manipulated using mutable
    state, the underlying "clean" version of the objects would be modified and the
    updated object would not be recognized as dirty, and therefore would not be
    updated at all unless explicitly marked as dirty or through a force put.

    class Model
      include Aws::Record
      string_attr :uuid, hash_key: true
      list_attr :collection
    end
    
    item = Model.new(uuid: SecureRandom.uuid, collection: [1,2,3])
    item.clean! # As if loaded from the database, to demonstrate the new tracking.
    item.dirty? # => false
    item.collection << 4 # In place mutation of the "collection" array.
    item.dirty? # => true (Previous versions would not recognize this as dirty.
    item.save # Would call Aws::DynamoDB::Client#update_item for :collection only.
    

    Note that this feature is implemented using deep copies of collection objects
    in memory, so there is a potential memory/performance hit in exchange for the
    added accuracy. As such, mutation tracking can be explicitly turned off at the
    attribute level or at the full model level, if desired.

    # Note that the disabling of mutation tracking is redundant in this example,
    # for illustration purposes.
    class Model
      include Aws::Record
      disable_mutation_tracking # For turning off mutation at the model level.
      string_attr :uuid, hash_key: true
      list_attr :collection, mutation_tracking: false # Turn off at attr level.
    end
    
aws-sdk-ruby-record -

Published by awood45 over 8 years ago

aws-sdk-ruby-record -

Published by awood45 over 8 years ago