{"id":25915870,"url":"https://github.com/rykov/rom-dynamo","last_synced_at":"2025-03-03T12:18:03.718Z","repository":{"id":27525787,"uuid":"31006817","full_name":"rykov/rom-dynamo","owner":"rykov","description":"AWS DynamoDB adapter for Ruby Object Mapper","archived":false,"fork":false,"pushed_at":"2021-08-24T05:28:51.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-24T22:21:05.819Z","etag":null,"topics":["data-access-layer","databases","dynamodb","nosql","rom-rb","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rykov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-19T08:27:16.000Z","updated_at":"2022-04-11T17:18:08.000Z","dependencies_parsed_at":"2022-08-21T01:20:50.666Z","dependency_job_id":null,"html_url":"https://github.com/rykov/rom-dynamo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rykov%2From-dynamo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rykov%2From-dynamo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rykov%2From-dynamo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rykov%2From-dynamo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rykov","download_url":"https://codeload.github.com/rykov/rom-dynamo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241444024,"owners_count":19963749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-access-layer","databases","dynamodb","nosql","rom-rb","ruby"],"created_at":"2025-03-03T12:18:03.149Z","updated_at":"2025-03-03T12:18:03.705Z","avatar_url":"https://github.com/rykov.png","language":"Ruby","readme":"[gem]: https://rubygems.org/gems/rom-dynamo\n[aws]: https://github.com/aws/aws-sdk-core-ruby\n\n# Rom::Dynamo\n\n[![Gem Version](https://badge.fury.io/rb/rom-dynamo.svg)][gem]\n[![Build Status](https://github.com/rykov/rom-dynamo/actions/workflows/specs.yml/badge.svg)](https://github.com/rykov/rom-dynamo/actions/workflows/specs.yml)\n\nAWS DynamoDB support for [Ruby Object Mapper](https://github.com/rom-rb/rom).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rom-dynamo'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rom-dynamo\n\n## Usage\n\nROM-Dynamo uses [aws-sdk-core][aws] library, so you will need to initialize that first:\n\n    Aws.config.merge!({\n      credentials:   Aws::Credentials.new(AWS_ACCESS, AWS_SECRET),\n      region:        'us-east-1'\n    })\n\nTo connect, use the following URL to specify the AWS region and table name prefix.  In this case, accessing `photos` will map to the table `table-name-prefix-photos`:\n\n    dynamo://region/table-name-prefix-/\n\nSo a sample setup will be:\n\n    rom = ROM.setup(:dynamo, 'dynamo://us-east-1/development_app_/') do\n      relation(:photos) do\n        # This will call GetItem API directly\n        def by_id(id)\n          restrict(id: id)\n        end\n\n        # This will first query a Global Secondary Index\n        def all_for_user(id)\n          index_restrict('user-to-id', user_id: id)\n        end\n      end\n\n      commands(:photos) do\n        define(:create) { result(:one) }\n        define(:delete) { result(:one) }\n      end\n    end\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\n1. Fork it ( https://github.com/rykov/rom-dynamo/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frykov%2From-dynamo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frykov%2From-dynamo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frykov%2From-dynamo/lists"}