PHP Class evseevnn\Cassandra\Database

Exibir arquivo Open project: evseevnn/php-cassandra-binary Class Usage Examples

Public Methods

Method Description
__construct ( array $nodes, string $keyspace = '', array $options = [] )
applyBatch ( $consistency = ConsistencyEnum::CONSISTENCY_QUORUM ) Exec transaction
beginBatch ( ) Start transaction
beginCounterBatch ( ) Start counter transaction
beginUnloggedBatch ( ) Start unlogged transaction
connect ( ) : boolean Connect to database
disconnect ( ) : boolean Disconnect to database
query ( string $cql, array $values = [], integer $consistency = ConsistencyEnum::CONSISTENCY_QUORUM ) : array | null Send query into database
setKeyspace ( string $keyspace )

Private Methods

Method Description
appendQueryToStack ( string $cql, array $values )

Method Details

__construct() public method

public __construct ( array $nodes, string $keyspace = '', array $options = [] )
$nodes array
$keyspace string
$options array

applyBatch() public method

Exec transaction
public applyBatch ( $consistency = ConsistencyEnum::CONSISTENCY_QUORUM )

beginBatch() public method

Start transaction
public beginBatch ( )

beginCounterBatch() public method

Start counter transaction
public beginCounterBatch ( )

beginUnloggedBatch() public method

Start unlogged transaction
public beginUnloggedBatch ( )

connect() public method

Connect to database
public connect ( ) : boolean
return boolean

disconnect() public method

Disconnect to database
public disconnect ( ) : boolean
return boolean

query() public method

Send query into database
public query ( string $cql, array $values = [], integer $consistency = ConsistencyEnum::CONSISTENCY_QUORUM ) : array | null
$cql string
$values array
$consistency integer
return array | null

setKeyspace() public method

public setKeyspace ( string $keyspace )
$keyspace string