Documentation

Cluster
in package

Cluster is an object containing functionality for performing cluster level operations against a cluster and for access to buckets.

Tags
since
4.0.0

Table of Contents

$connectionHash  : string
$core  : resource
$options  : ClusterOptions
__construct()  : mixed
analyticsIndexes()  : AnalyticsIndexManager
Creates a new manager object for managing analytics query indexes.
analyticsQuery()  : AnalyticsResult
Executes an analytics query against the cluster.
bucket()  : Bucket
Returns a new bucket object.
buckets()  : BucketManager
Creates a new bucket manager object for managing buckets.
diagnostics()  : mixed
Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.
ping()  : mixed
Executes a ping for each service against each node in the cluster. This can be used for determining the current health of the cluster.
query()  : QueryResult
Executes a N1QL query against the cluster.
queryIndexes()  : QueryIndexManager
Creates a new manager object for managing N1QL query indexes.
searchIndexes()  : SearchIndexManager
Creates a new search index manager object for managing search query indexes.
searchQuery()  : SearchResult
Executes a full text search query against the cluster.
transactions()  : Transactions
Creates a new bucket manager object for managing buckets.
users()  : UserManager
Creates a new user manager object for managing users and groups.

Properties

$connectionHash

private string $connectionHash

Methods

analyticsQuery()

Executes an analytics query against the cluster.

public analyticsQuery(string $statement[, AnalyticsOptions|null $options = null ]) : AnalyticsResult

Note: On Couchbase Server versions < 6.5 a bucket must be opened before using analyticsQuery.

Parameters
$statement : string

the analytics query statement to execute

$options : AnalyticsOptions|null = null

the options to use when executing the query

Tags
throws
TimeoutException
throws
CouchbaseException
since
4.0.0
Return values
AnalyticsResult

bucket()

Returns a new bucket object.

public bucket(string $name) : Bucket
Parameters
$name : string

the name of the bucket

Tags
since
4.0.0
Return values
Bucket

diagnostics()

Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.

public diagnostics([string|null $reportId = null ]) : mixed
Parameters
$reportId : string|null = null

a name which will be included within the ping result

Tags
since
4.0.0
Return values
mixed

ping()

Executes a ping for each service against each node in the cluster. This can be used for determining the current health of the cluster.

public ping([mixed|null $services = null ][, mixed|null $reportId = null ]) : mixed
Parameters
$services : mixed|null = null

the services to ping against

$reportId : mixed|null = null

a name which will be included within the ping result

Tags
see
ServiceType::KEY_VALUE
see
ServiceType::QUERY
see
ServiceType::ANALYTICS
see
ServiceType::SEARCH
see
ServiceType::VIEWS
see
ServiceType::MANAGEMENT
see
ServiceType::EVENTING
since
4.0.0
Return values
mixed

query()

Executes a N1QL query against the cluster.

public query(string $statement[, QueryOptions|null $options = null ]) : QueryResult

Note: On Couchbase Server versions < 6.5 a bucket must be opened before using query.

Parameters
$statement : string

the N1QL query statement to execute

$options : QueryOptions|null = null

the options to use when executing the query

Tags
throws
InvalidArgumentException
throws
TimeoutException
throws
CouchbaseException
since
4.0.0
Return values
QueryResult

searchQuery()

Executes a full text search query against the cluster.

public searchQuery(string $indexName, SearchQuery $query[, SearchOptions|null $options = null ]) : SearchResult

Note: On Couchbase Server versions < 6.5 a bucket must be opened before using searchQuery.

Parameters
$indexName : string

the fts index to use for the query

$query : SearchQuery

the search query to execute

$options : SearchOptions|null = null

the options to use when executing the query

Tags
since
4.0.0
Return values
SearchResult

transactions()

Creates a new bucket manager object for managing buckets.

public transactions() : Transactions
Tags
since
4.0.0
Return values
Transactions

users()

Creates a new user manager object for managing users and groups.

public users() : UserManager
Tags
since
4.0.0
Return values
UserManager

        

Search results