Overview

Namespaces

  • cassandra
  • None
  • PHP
  • phpcassa
    • Batch
    • Connection
    • Index
    • Iterator
    • Schema
      • DataType
    • Util
    • UUID

Classes

  • AbstractMutator
  • CfMutator
  • Mutator
  • Overview
  • Namespace
  • Class
  • Tree

Class Mutator

Allows you to group multiple mutations across one or more keys and column families into a single batch operation.

phpcassa\Batch\AbstractMutator
Extended by phpcassa\Batch\Mutator
Namespace: phpcassa\Batch
Package: phpcassa\Batch
Located at phpcassa/Batch/Mutator.php
Methods summary
public
# __construct( phpcassa\Connection\ConnectionPool $pool, cassandra\ConsistencyLevel $consistency_level = phpcassa\Batch\ConsistencyLevel::ONE )

Intialize a mutator with a connection pool and consistency level.

Intialize a mutator with a connection pool and consistency level.

Parameters

$pool
phpcassa\Connection\ConnectionPool
$pool the connection pool to use for all operations
$consistency_level
cassandra\ConsistencyLevel
$consistency_level the default consistency level this mutator will write at, with a default of ConsistencyLevel::ONE
public
# insert( phpcassa\ColumnFamily $column_family, mixed $key, mixed[] $columns, integer $timestamp = null, integer $ttl = null )

Add an insertion to the buffer.

Add an insertion to the buffer.

Parameters

$column_family
phpcassa\ColumnFamily
$column_family an initialized ColumnFamily instance
$key
mixed
$key the row key
$columns
mixed[]
$columns an array of columns to insert, whose format should match $column_family->insert_format
$timestamp
integer
$timestamp an optional timestamp (default is "now", when this function is called, not when send() is called)
$ttl
integer
$ttl a TTL to apply to all columns inserted here
public
# remove( phpcassa\ColumnFamily $column_family, mixed $key, mixed[] $columns = null, mixed $super_column = null, integer $timestamp = null )

Add a deletion to the buffer.

Add a deletion to the buffer.

Parameters

$column_family
phpcassa\ColumnFamily
$column_family an initialized ColumnFamily instance
$key
mixed
$key the row key
$columns
mixed[]
$columns a list of columns or super columns to delete
$super_column
mixed
$supercolumn if you want to delete only some subcolumns from a single super column, set this to the super column name
$timestamp
integer
$timestamp an optional timestamp (default is "now", when this function is called, not when send() is called)
Methods inherited from phpcassa\Batch\AbstractMutator
send()
phpcassa API documentation generated by ApiGen 2.8.0