Overview

Namespaces

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

Classes

  • AbstractColumnFamily
  • ColumnFamily
  • ColumnSlice
  • SuperColumnFamily
  • SystemManager
  • UUID
  • Overview
  • Namespace
  • Class
  • Tree

Class ColumnFamily

Representation of a column family in Cassandra.

All data insertions, deletions, or retrievals will go through a ColumnFamily. This may only be used for standard column families; you must use \phpcassa\SuperColumnFamily for super column families.

phpcassa\AbstractColumnFamily
Extended by phpcassa\ColumnFamily
Namespace: phpcassa
Package: phpcassa
Located at phpcassa/ColumnFamily.php
Methods summary
public
# add( string $key, mixed $column, integer $value = 1, cassandra\ConsistencyLevel $consistency_level = null )

Increment or decrement a counter.

Increment or decrement a counter.

value should be an integer, either positive or negative, to be added to a counter column. By default, value is 1.

This method is not idempotent. Retrying a failed add may result in a double count. You should consider using a separate ConnectionPool with retries disabled for column families with counters.

Only available in Cassandra 0.8.0 and later.

Parameters

$key
string
$key the row to insert or update the columns in
$column
mixed
$column the column name of the counter
$value
integer
$value the amount to adjust the counter by
$consistency_level
cassandra\ConsistencyLevel
$consistency_level affects the guaranteed number of nodes that must respond before the operation returns
Methods inherited from phpcassa\AbstractColumnFamily
__construct(), batch(), batch_insert(), get(), get_count(), get_indexed_slices(), get_range(), get_range_by_token(), insert(), multiget(), multiget_count(), remove(), remove_counter(), set_autopack_keys(), set_autopack_names(), set_autopack_values(), truncate()
Constants inherited from phpcassa\AbstractColumnFamily
ARRAY_FORMAT, DEFAULT_BUFFER_SIZE, DEFAULT_ROW_COUNT, DICTIONARY_FORMAT, OBJECT_FORMAT
Properties inherited from phpcassa\AbstractColumnFamily
$autopack_keys, $autopack_names, $autopack_values, $buffer_size, $insert_format, $read_consistency_level, $return_format, $write_consistency_level
phpcassa API documentation generated by ApiGen 2.8.0