aws / aws-sdk-ruby-record

Official repository for the aws-record gem, an abstraction for Amazon DynamoDB.
Apache License 2.0
318 stars 41 forks source link

Batch Read #126

Closed jterapin closed 1 year ago

jterapin commented 1 year ago

Issue #, if available: https://github.com/aws/aws-sdk-ruby-record/issues/122

Description of changes: There are often cases where application code needs to read a number of homogenous items from a table. Currently users need to execute a find (get_item) for each individual item. This results in a large number of network calls and adds significant latency to an application. DynamodDB supports batch_get_item to address this, but aws-record does not provide users with a way to use it.

This PR introduce support for batch_get_item with a BatchRead class (capable of reading multiple items from multiple tables) which can be used by individual Record classes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jterapin commented 1 year ago

FYI: Documentation is WIP

jterapin commented 1 year ago

Docs are now added in!