The docs (for example for :batchexec) make it clear that there is a batch object returned by the generated function, but it's not really easy for me to tell what to do with that or how to use it.
I see there's an Exec function that takes a func(int, error) parameter, but I don't know what the passed-in function is supposed to do.
The doc for Close seems more clearcut, but I'm not sure what it means to close the batch operation early. Does that mean that the some inserts won't run?
Some examples of how to use this would be incredibly helpful.
The docs (for example for
:batchexec) make it clear that there is a batch object returned by the generated function, but it's not really easy for me to tell what to do with that or how to use it.I see there's an
Execfunction that takes afunc(int, error)parameter, but I don't know what the passed-in function is supposed to do.The doc for
Closeseems more clearcut, but I'm not sure what it means to close the batch operation early. Does that mean that the some inserts won't run?Some examples of how to use this would be incredibly helpful.