Batch packet (Cassandra)
This packet is sent by the client to execute one or more queries at once.
Properties
batchType (int): 0 == logged, 1 == unlogged, 2 == counter
queries (list<BatchQuery>): the queries to execute -- see below for details on the BatchQuery object
consistency (int): the consistency level for the operation. See Cassandra common flags for details.
serialConsistency (int): the consistency level for the serial phase of conditional updates. See Cassandra common flags for details. This can only be SERIAL or LOCAL_SERIAL. If not present, defaults to SERIAL. This option is ignored for anything other than a conditional update/insert.
flagWithSerialConsistency (boolean): if true, serialConsistency is specified.
flagWithDefaultTimestamp (boolean); if true, then defaultTimestamp is specified.
flagWithNamesForValues (boolean): currently unused
flagWithKeyspace (boolean): if true, then keyspaceName is specified
flagWithNowInSeconds (boolean): if true, then nowInSeconds is valid
defaultTimestamp (long): set if flagWithDefaultTimestamp is set. The default timestamp for the query in microseconds.
keyspaceName (string): the keyspace in which the queries should be executed.
nowInSeconds (int): the current time (now) for the query
Methods
This packet type has no methods aside from the common ones.
BatchQuery object
Properties
queryType (int): 0 == standard, 1 == prepared statement
queryString (string): if queryType == 0, the text of the query
queryId (byte[]): if queryType == 1, the ID of the prepared statement to execute
values (list<QueryParameterValue>): the values for the parameters in the query