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
-
phpcassa\ColumnFamily
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()
|