Open mattbornski opened 10 years ago
@mattbornski How do you envision this new write capability being accessed from a dynamoid model? We would also like to utilize the batch insert.
I imagine that we'll have to implement something like this:
https://github.com/zdennis/activerecord-import
but for dynamoid. Syntax along the lines of "YourModel::import([YourModel.new(foo, bar), YourModel.new(foo2, bar2)])".
On Thu, Dec 12, 2013 at 10:44 AM, Mark McEahern notifications@github.comwrote:
@mattbornski https://github.com/mattbornski How do you envision this new write capability being accessed from a dynamoid model? We would also like to utilize the batch insert.
— Reply to this email directly or view it on GitHubhttps://github.com/Veraticus/Dynamoid/pull/165#issuecomment-30449489 .
This should also be hooked into ActiveRecord's "subset conditions" (http://guides.rubyonrails.org/active_record_querying.html, section 2.3.3) which would be more handily named "batch finds"
I'm guessing you can use that to say "Client.where(:id => [1, 3, 5]).update_all({ :paid_up => true } "
@lisad feel like taking a stab at that? The batch insertions was really the only batch operation I needed.
I have a use case which would be more optimal with batch inserts, so I have implemented it in your driver. Enjoy.