Class CfMutator
A convenience subclass of phpcassa\Batch\Mutator for dealing with batch
operations on a single column family.
-
phpcassa\Batch\AbstractMutator
-
phpcassa\Batch\CfMutator
Methods summary
public
|
#
__construct( phpcassa\ColumnFamily $column_family, phpcassa\ConsistencyLevel $write_consistency_level = null )
Initialize a mutator for a given column family.
Initialize a mutator for a given column family.
Parameters
- $column_family
phpcassa\ColumnFamily
$column_family an initialized instanced of ColumnFamily; this object's pool will
be used for all operations.
- $write_consistency_level
phpcassa\ConsistencyLevel $write_consistency_level the consistency level this mutator will write at; if
left as NULL, this defaults to $column_family->write_consistency_level.
|
public
|
#
insert( mixed $key, mixed[] $columns, integer $timestamp = null, integer $ttl = null )
Add an insertion to the buffer.
Add an insertion to the buffer.
Parameters
- $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( 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
- $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)
|