5.3.1 Batch

This class represents a batch of operations.

Batch extends Context
execute(Function(Object error) callback);

Execute this batch. When a batch is executed, all operations are executed; the callback for each operation is called when that operation is executed (operations are not performed in any particular order). The execute() function's callback is also called.

A batch is executed in the context of the session's current state: this is autocommit if a transaction has not been started; this also includes the default lock mode and the partition key.


Clear this batch without affecting the transaction state. After being cleared, the batch is still valid, but all operations previously defined are removed; this restores the batch to a clean state.

The callbacks for any operations that are defined for this batch are called with an error indicating that the batch has been cleared.

This function requires no arguments.


Get the session from which this batch was created.

This function requires no arguments.

Download this Manual
PDF (US Ltr) - 4.8Mb
PDF (A4) - 4.8Mb
EPUB - 1.9Mb
HTML Download (TGZ) - 1.8Mb
HTML Download (Zip) - 1.9Mb
User Comments
Sign Up Login You must be logged in to post a comment.