Scope
in package
Scope is an object for providing access to collections.
Table of Contents
- $bucketName : string
- $core : resource
- $name : string
- 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.
Properties
$bucketName
private
string
$bucketName
$core
private
resource
$core
$name
private
string
$name
Methods
analyticsQuery()
Executes an analytics query against the cluster with scopeName set implicitly.
public
analyticsQuery(string $statement[, AnalyticsOptions|null $options = null ]) : AnalyticsResult
Parameters
- $statement : string
-
the analytics query statement to execute
- $options : AnalyticsOptions|null = null
-
the options to use when executing the query
Tags
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
Tags
Return values
Collection —name()
Returns the name of the scope.
public
name() : string
Tags
Return values
string —query()
Executes a N1QL query against the cluster with scopeName set implicitly.
public
query(string $statement[, QueryOptions|null $options = null ]) : QueryResult
Parameters
- $statement : string
-
the N1QL query statement to execute
- $options : QueryOptions|null = null
-
the options to use when executing the query