storm
storm copied to clipboard
Bulk updates e.g. saving and array []Person
- I there a method for this, instead of looping and calling .Save on each element?
- 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
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