Documentation

Scope

Scope is an object for providing access to collections.

Table of Contents

__construct()  : mixed
analyticsQuery()  : AnalyticsResult
Executes an analytics query against the cluster with scopeName set implicitly.
collection()  : Collection
Returns a new Collection object representing the collection specified.
name()  : string
Returns the name of the scope.
query()  : QueryResult
Executes a N1QL query against the cluster with scopeName set implicitly.

Methods

__construct()

public __construct(Bucket $bucket, string $name) : mixed
Parameters
$bucket : Bucket
$name : string
Return values
mixed

analyticsQuery()

Executes an analytics query against the cluster with scopeName set implicitly.

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

the analytics query statement to execute

$options : AnalyticsOptions = null

the options to use when executing the query

Return values
AnalyticsResult

collection()

Returns a new Collection object representing the collection specified.

public collection(string $name) : Collection
Parameters
$name : string

the name of the collection

Return values
Collection

name()

Returns the name of the scope.

public name() : string
Return values
string

query()

Executes a N1QL query against the cluster with scopeName set implicitly.

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

the N1QL query statement to execute

$options : QueryOptions = null

the options to use when executing the query

Return values
QueryResult

Search results