class AsyncScope extends AnyRef
Represents a Couchbase scope resource.
This is an asynchronous version of the Scope interface.
Applications should not create these manually, but instead first open a Cluster and through that a Bucket.
- Since
1.0.0
- Alphabetic
- By Inheritance
- AsyncScope
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def analyticsQuery(statement: String, options: AnalyticsOptions = AnalyticsOptions.Default): Future[AnalyticsResult]
Performs an Analytics query against the cluster.
Performs an Analytics query against the cluster.
This is asynchronous. See Cluster.reactive for a reactive streaming version of this API, and Cluster for a blocking version. The reactive version includes backpressure-aware row streaming.
The reason to use this Scope-based variant over
AsyncCluster.analyticsQuery
is that it will automatically provide the "query_context" parameter to the query service, allowing queries to be performed on collections without having to fully specify their bucket and scope names in the query statement.- statement
the Analytics query to execute
- options
any query options - see com.couchbase.client.scala.analytics.AnalyticsOptions for documentation
- returns
a
Future
containing aSuccess(AnalyticsResult)
(which includes any returned rows) if successful, else aFailure
- val bucketName: String
- def collection(collectionName: String): AsyncCollection
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()): Future[QueryResult]
Performs a N1QL query against the cluster.
Performs a N1QL query against the cluster.
This is asynchronous. See Scope.reactive for a reactive streaming version of this API, and Scope for a blocking version. The reactive version includes backpressure-aware row streaming.
The reason to use this Scope-based variant over
AsyncCluster.query
is that it will automatically provide the "query_context" parameter to the query service, allowing queries to be performed on collections without having to fully specify their bucket and scope names 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
Future
containing aSuccess(QueryResult)
(which includes any returned rows) if successful, else aFailure
- def search(indexName: String, request: SearchRequest, options: SearchOptions): Future[SearchResult]
Performs a Full Text Search (FTS) query.
Performs a Full Text Search (FTS) query.
This can be used to perform a traditional FTS query, and/or a vector search.
Use this to access scoped FTS indexes, and Cluster.search for global indexes.
- indexName
the name of the search index to use
- request
the request to send to the FTS service.
- options
- returns
a
Try
containing aSuccess(SearchResult)
(which includes any returned rows) if successful, else aFailure
- Annotations
- @SinceCouchbase()
- def search(indexName: String, request: SearchRequest): Future[SearchResult]
Performs a Full Text Search (FTS) query.
Performs a Full Text Search (FTS) query.
This can be used to perform a traditional FTS query, and/or a vector search.
Use this to access scoped FTS indexes, and Cluster.search for global indexes.
- indexName
the name of the search index to use
- request
the request to send to the FTS service.
- returns
a
Try
containing aSuccess(SearchResult)
(which includes any returned rows) if successful, else aFailure
- Annotations
- @SinceCouchbase()
- lazy val searchIndexes: AsyncScopeSearchIndexManager
Allows managing scoped FTS indexes.
Allows managing scoped FTS indexes.
- Annotations
- @SinceCouchbase()