Package com.couchbase.client.java
Class ReactiveScope
java.lang.Object
com.couchbase.client.java.ReactiveScope
public class ReactiveScope extends Object
The scope identifies a group of collections and allows high application
density as a result.
If no scope is explicitly provided, the default scope is used.
- Since:
- 3.0.0
-
Method Summary
Modifier and Type Method Description Mono<ReactiveAnalyticsResult>
analyticsQuery(String statement)
Performs an Analytics query with defaultAnalyticsOptions
on a scopeMono<ReactiveAnalyticsResult>
analyticsQuery(String statement, AnalyticsOptions options)
Performs an Analytics query with customAnalyticsOptions
on a scopeAsyncScope
async()
Returns the underlying async scope.String
bucketName()
The name of the bucket this scope is attached to.ReactiveCollection
collection(String collectionName)
Opens a collection for this scope with an explicit name.Core
core()
Provides access to the underlyingCore
.ClusterEnvironment
environment()
Provides access to the configuredClusterEnvironment
for this scope.String
name()
The name of the scope.Mono<ReactiveQueryResult>
query(String statement)
Performs a N1QL query with defaultQueryOptions
in a ScopeMono<ReactiveQueryResult>
query(String statement, QueryOptions options)
Performs a N1QL query with customQueryOptions
in a Scope
-
Method Details
-
name
The name of the scope.- Returns:
- the name of the scope.
-
bucketName
The name of the bucket this scope is attached to. -
async
Returns the underlying async scope. -
core
Provides access to the underlyingCore
.This is advanced API, use with care!
-
environment
Provides access to the configuredClusterEnvironment
for this scope. -
collection
Opens a collection for this scope with an explicit name.- Parameters:
collectionName
- the collection name.- Returns:
- the requested collection if successful.
-
query
Performs a N1QL query with defaultQueryOptions
in a Scope- Parameters:
statement
- the N1QL query statement as a raw string.- Returns:
- the
ReactiveQueryResult
once the response arrives successfully.
-
query
Performs a N1QL query with customQueryOptions
in a Scope- Parameters:
statement
- the N1QL query statement as a raw string.options
- the custom options for this query.- Returns:
- the
ReactiveQueryResult
once the response arrives successfully.
-
analyticsQuery
Performs an Analytics query with defaultAnalyticsOptions
on a scope- Parameters:
statement
- the Analytics query statement as a raw string.- Returns:
- the
ReactiveAnalyticsResult
once the response arrives successfully.
-
analyticsQuery
@Volatile public Mono<ReactiveAnalyticsResult> analyticsQuery(String statement, AnalyticsOptions options)Performs an Analytics query with customAnalyticsOptions
on a scope- Parameters:
statement
- the Analytics query statement as a raw string.options
- the custom options for this analytics query.- Returns:
- the
ReactiveAnalyticsResult
once the response arrives successfully.
-