Batch statement groups several Statement. There are several types of Batch statements available:

See Also:

Inherits

Object

Includes

Methods

add

(statement, args = nil, type_hints = nil)

Adds a statement to this batch.

Note
Positional arguments for simple statements are only supported starting with Apache Cassandra 2.0 and above.
Note
Named arguments for simple statements are only supported starting with Apache Cassandra 2.1 and above.
Parameters:
Name Type Details
statement (String, Statements::Simple, Statements::Prepared or Statements::Bound) statement to add.
args (Array or Hash) (defaults to: nil) (nil) positional or named arguments to bind, must contain the same number of parameters as the number of positional (?) or named (:name) markers in the CQL passed.
type_hints (Array or Hash) (defaults to: nil) (nil) specified CQL types for positional or named arguments to override type guessing.
Returns:
Type Details
self

cql

A batch statement doesn’t really have any cql of its own as it is composed of multiple different statements

Returns:
Type Details
nil nothing

type

Returns one of :logged, :unlogged or :counter

Returns:
Type Details
Symbol one of :logged, :unlogged or :counter

inspect

Returns a CLI-friendly batch statement representation

Returns:
Type Details
String a CLI-friendly batch statement representation