PHP Интерфейс Cassandra\Session

См. также: Cluster::connect()
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
close ( float | null $timeout = null ) : void Closes current session and all of its connections.
closeAsync ( ) : cassandra\Future Asynchronously closes current session once all pending requests have finished.
execute ( cassandra\Statement $statement, ExecutionOptions $options = null ) : Rows Executes a given statement and returns a result.
executeAsync ( cassandra\Statement $statement, ExecutionOptions $options = null ) : cassandra\Future Executes a given statement and returns a future result.
metrics ( ) : array Returns current performance/diagnostic metrics.
prepare ( string $cql, ExecutionOptions $options = null ) : PreparedStatement Creates a prepared statement from a given CQL string.
prepareAsync ( string $cql, ExecutionOptions $options = null ) : cassandra\Future Asynchronously prepares a statement and returns a future prepared statement.
schema ( ) : cassandra\Schema Returns current schema.

Описание методов

close() публичный метод

Closes current session and all of its connections.
public close ( float | null $timeout = null ) : void
$timeout float | null Timeout to wait for closure in seconds
Результат void

closeAsync() публичный метод

Asynchronously closes current session once all pending requests have finished.
public closeAsync ( ) : cassandra\Future
Результат cassandra\Future future

execute() публичный метод

Executes a given statement and returns a result.
public execute ( cassandra\Statement $statement, ExecutionOptions $options = null ) : Rows
$statement cassandra\Statement statement to be executed
$options ExecutionOptions execution options (optional)
Результат Rows execution result

executeAsync() публичный метод

Note that this method ignores timeout specified in the ExecutionOptions, you can provide one to Future::get() instead.
public executeAsync ( cassandra\Statement $statement, ExecutionOptions $options = null ) : cassandra\Future
$statement cassandra\Statement statement to be executed
$options ExecutionOptions execution options (optional)
Результат cassandra\Future future result

metrics() публичный метод

Returns current performance/diagnostic metrics.
public metrics ( ) : array
Результат array Performance/Diagnostic metrics.

prepare() публичный метод

Note that this method only uses the ExecutionOptions::$timeout option, all other options will be ignored.
public prepare ( string $cql, ExecutionOptions $options = null ) : PreparedStatement
$cql string CQL statement string
$options ExecutionOptions execution options (optional)
Результат PreparedStatement prepared statement

prepareAsync() публичный метод

Note that all options passed to this method will be ignored.
public prepareAsync ( string $cql, ExecutionOptions $options = null ) : cassandra\Future
$cql string CQL string to be prepared
$options ExecutionOptions preparation options
Результат cassandra\Future statement

schema() публичный метод

NOTE: the returned Schema instance will not be updated as the actual schema changes, instead an updated instance should be requested by calling Session::schema() again.
public schema ( ) : cassandra\Schema
Результат cassandra\Schema current schema.