inBatch
Runs a group of database operations in a batch. Use this when performing bulk write operations like multiple inserts/updates; it saves the overhead of multiple database commits, greatly improving performance.
Parameters
work
a unit of work that may terminate abruptly (with an exception)
Throws
Throws an exception if any error occurs during the operation.