storm icon indicating copy to clipboard operation
storm copied to clipboard

Bulk updates e.g. saving and array []Person

Open kristjank opened this issue 7 years ago • 1 comments

  1. I there a method for this, instead of looping and calling .Save on each element?
  2. If loop is the way to go - what is the best approach to speed things up, such as: a.) - transaction b.) - saw something on batch mode, but is hard to find examples....

Ty

kristjank avatar Aug 10 '17 11:08 kristjank

There are indeed no bulk updates, you need to loop. Using the storm.Batch(true) option you can use goroutines to save multiple items at concurrently. https://github.com/boltdb/bolt#batch-read-write-transactions

asdine avatar Sep 09 '17 07:09 asdine