Dinamo is an simple ORM for Amazon DynamoDB for Ruby applications.
Add this line to your application's Gemfile:
gem 'dinamo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dinamo
Your class must inherit Dinamo::Model
in every Dinamo model.
class User < Dinamo::Model
hash_key :id, type: :number
range_key :kind, type: :string
field :name, type: :string
end
user = User.new
user.id = 1
user.kind = "developer"
user.name = "namusyaka"
user.valid? #=> true
user.errors #=> {}
user.save #=> true
Bug reports and pull requests are welcome on GitHub at https://github.com/namusyaka/dinamo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.