Dynamoid / dynamoid

Ruby ORM for Amazon's DynamoDB.
MIT License
580 stars 195 forks source link

Support segment/total_segments for scans #593

Open mrkamel opened 2 years ago

mrkamel commented 2 years ago

Hi,

it seems the segment/total_segments options can not be used yet from within dynamoid (right?), but i think this would be a really great addition to parallelize requests:

MyTable.with_segment(3, total_segments: 16).where(some_field: 'value').delete

What do you think? Any plans adding it? Would you be open for PRs regarding it?

andrykonchin commented 2 years ago

Hey. Agree, it may be useful. The proposed signature (with_segment(int, total_segments: int)) looks good.