PHP Class CassandraCF, phpcassa

ファイルを表示 Open project: hoan/phpcassa Class Usage Examples

Public Properties

Property Type Description
$column_family
$column_type
$is_super
$keyspace
$parse_columns CompareSubcolumnsWith (TODO: actually use this)
$read_consistency_level
$subcolumn_type CompareWith (TODO: actually use this)
$write_consistency_level

Public Methods

Method Description
__construct ( $keyspace, $column_family, $is_super = false, $column_type = self::DEFAULT_COLUMN_TYPE, $subcolumn_type = self::DEFAULT_SUBCOLUMN_TYPE, $read_consistency_level = cassandra_ConsistencyLevel::ONE, $write_consistency_level = cassandra_ConsistencyLevel::ZERO ) * BytesType: Simple sort by byte value. No validation is performed.
array_to_columns ( $array, $timestamp = null )
array_to_mutation ( $array, $timestamp = null ) Helpers for turning PHP arrays into Cassandra's thrift objects
array_to_supercolumns_or_columns ( $array, $timestamp = null )
columns_to_array ( $array_of_c )
get ( $key, $super_column = NULL, $slice_start = "", $slice_finish = "", $column_reversed = False, $column_count = self::DEFAULT_COLUMN_LIMIT )
get_count ( $key, $super_column = null )
get_list ( $key, $key_name = 'key', $slice_start = "", $slice_finish = "" ) Wrappers
get_range ( $start_key = "", $end_key = "", $row_count = self::DEFAULT_ROW_LIMIT, $slice_start = "", $slice_finish = "" )
get_range_iterator ( $start_key = "", $end_key = "", $row_count = self::DEFAULT_ROW_LIMIT, $slice_start = "", $slice_finish = "" )
get_range_list ( $key_name = 'key', $start_key = "", $end_key = "", $row_count = self::DEFAULT_ROW_LIMIT, $slice_start = "", $slice_finish = "" )
insert ( $key, $columns = null )
keyslices_to_array ( $keyslices ) Helpers for parsing Cassandra's thrift objects into PHP arrays
multiget ( $keys, $slice_start = "", $slice_finish = "" )
multiget_list ( $keys, $key_name = 'key', $slice_start = "", $slice_finish = "" )
pack_longtype ( $x ) See http://webcache.googleusercontent.com/search?q=cache:9jjbeSy434UJ:wiki.apache.org/cassandra/FAQ+cassandra+php+%22A+long+is+exactly+8+bytes%22&cd=1&hl=en&ct=clnk&gl=us
parse_column_name ( $column_name, $is_column = true ) ARGH
remove ( $key, $column_name = null )
supercolumns_or_columns_to_array ( $array_of_c_or_sc, $parse_as_columns = true )
to_column_value ( $thing )
unpack_longtype ( $x )
unparse_column_name ( $column_name, $is_column = true )

Method Details

__construct() public method

AsciiType: Like BytesType, but validates that the input can be parsed as US-ASCII. UTF8Type: A string encoded as UTF8 LongType: A 64bit long LexicalUUIDType: A 128bit UUID, compared lexically (by byte value) TimeUUIDType: a 128bit version 1 UUID, compared by timestamp
public __construct ( $keyspace, $column_family, $is_super = false, $column_type = self::DEFAULT_COLUMN_TYPE, $subcolumn_type = self::DEFAULT_SUBCOLUMN_TYPE, $read_consistency_level = cassandra_ConsistencyLevel::ONE, $write_consistency_level = cassandra_ConsistencyLevel::ZERO )

array_to_columns() public method

public array_to_columns ( $array, $timestamp = null )

array_to_mutation() public method

Helpers for turning PHP arrays into Cassandra's thrift objects
public array_to_mutation ( $array, $timestamp = null )

array_to_supercolumns_or_columns() public method

public array_to_supercolumns_or_columns ( $array, $timestamp = null )

columns_to_array() public method

public columns_to_array ( $array_of_c )

get() public method

public get ( $key, $super_column = NULL, $slice_start = "", $slice_finish = "", $column_reversed = False, $column_count = self::DEFAULT_COLUMN_LIMIT )

get_count() public method

public get_count ( $key, $super_column = null )

get_list() public method

Wrappers
public get_list ( $key, $key_name = 'key', $slice_start = "", $slice_finish = "" )

get_range() public method

public get_range ( $start_key = "", $end_key = "", $row_count = self::DEFAULT_ROW_LIMIT, $slice_start = "", $slice_finish = "" )

get_range_iterator() public method

public get_range_iterator ( $start_key = "", $end_key = "", $row_count = self::DEFAULT_ROW_LIMIT, $slice_start = "", $slice_finish = "" )

get_range_list() public method

public get_range_list ( $key_name = 'key', $start_key = "", $end_key = "", $row_count = self::DEFAULT_ROW_LIMIT, $slice_start = "", $slice_finish = "" )

insert() public method

public insert ( $key, $columns = null )

keyslices_to_array() public method

Helpers for parsing Cassandra's thrift objects into PHP arrays
public keyslices_to_array ( $keyslices )

multiget() public method

public multiget ( $keys, $slice_start = "", $slice_finish = "" )

multiget_list() public method

public multiget_list ( $keys, $key_name = 'key', $slice_start = "", $slice_finish = "" )

pack_longtype() public method

See http://webcache.googleusercontent.com/search?q=cache:9jjbeSy434UJ:wiki.apache.org/cassandra/FAQ+cassandra+php+%22A+long+is+exactly+8+bytes%22&cd=1&hl=en&ct=clnk&gl=us
public pack_longtype ( $x )

parse_column_name() public method

ARGH
public parse_column_name ( $column_name, $is_column = true )

remove() public method

public remove ( $key, $column_name = null )

supercolumns_or_columns_to_array() public method

public supercolumns_or_columns_to_array ( $array_of_c_or_sc, $parse_as_columns = true )

to_column_value() public method

public to_column_value ( $thing )

unpack_longtype() public method

public unpack_longtype ( $x )

unparse_column_name() public method

public unparse_column_name ( $column_name, $is_column = true )

Property Details

$column_family public_oe property

public $column_family

$column_type public_oe property

public $column_type

$is_super public_oe property

public $is_super

$keyspace public_oe property

public $keyspace

$parse_columns public_oe property

CompareSubcolumnsWith (TODO: actually use this)
public $parse_columns

$read_consistency_level public_oe property

public $read_consistency_level

$subcolumn_type public_oe property

CompareWith (TODO: actually use this)
public $subcolumn_type

$write_consistency_level public_oe property

public $write_consistency_level