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

See Also:

Inherits

Object

Includes

Methods

add

(statement, args)

Adds a statement to this batch.

Overloads:
add(statement, *args)

Adds a statement to this batch using the deprecated splat-style way of passing positional arguments

Deprecated
Please pass a single Array of positional arguments, the *args style is deprecated.
Parameters:
Name Type Details
statement (String, Statements::Simple, Statements::Prepared or Statements::Bound) statement to add.
args *Object this style of positional arguments is deprecated, please pass a single Array instead - arguments to paramterized query or prepared statement
Parameters:
Name Type Details
statement (String, Statements::Simple, Statements::Prepared or Statements::Bound) statement to add.
args Array positional arguments to bind, must contain the same number of parameters as the number of positional (?) markers in the original CQL passed to Session#prepare
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