class ReactiveScope extends AnyRef
Represents a Couchbase scope resource.
This is a reactive version of the Scope interface.
Applications should not create these manually, but instead first open a Cluster and through that a Bucket.
- Annotations
- @Volatile()
- Since
1.0.0
- Alphabetic
- By Inheritance
- ReactiveScope
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ReactiveScope(async: AsyncScope, bucketName: String)
- bucketName
the name of the bucket this scope is on
Value Members
-
def
collection(collectionName: String): ReactiveCollection
Opens and returns a Couchbase collection resource, that exists on this scope.
-
def
name: String
The name of this scope.
-
def
query(statement: String, options: QueryOptions = QueryOptions()): SMono[ReactiveQueryResult]
Performs a N1QL query against the cluster.
Performs a N1QL query against the cluster.
This is a reactive API. See Scope.async for an Future-based async version of this API, and Scope for a blocking version.
The reason to use this Scope-based variant over ReactiveCluster.query is that it will automatically provide the "query_context" parameter to the query service, allowing queries to be specified on scopes and collections without having to fully reference them in the query statement.
- statement
the N1QL statement to execute
- options
any query options - see com.couchbase.client.scala.query.QueryOptions for documentation
- returns
a
ReactiveQueryResult
- Annotations
- @Volatile()