PHP 인터페이스 Cassandra\Session

또한 보기: Cluster::connect()
파일 보기 프로젝트 열기: datastax/php-driver 0 사용 예제들

공개 메소드들

메소드 설명
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.