Packages

class Scope extends AnyRef

Represents a Couchbase scope resource.

Applications should not create these manually, but instead first open a Cluster and through that a Bucket.

Since

1.0.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Scope
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def analyticsQuery(statement: String, options: AnalyticsOptions = AnalyticsOptions.Default): Try[AnalyticsResult]

    Performs an Analytics query against the cluster.

    Performs an Analytics query against the cluster.

    This is a blocking API. See Scope.async for an Future-based async version of this API, and Scope.reactive for a reactive version. The reactive version includes backpressure-aware row streaming.

    The reason to use this Scope-based variant over Cluster.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 Try containing a Success(AnalyticsResult) (which includes any returned rows) if successful, else a Failure

  2. val async: AsyncScope
  3. val bucketName: String
  4. def collection(collectionName: String): Collection

    Opens and returns a Couchbase collection resource, that exists on this scope.

  5. lazy val eventingFunctions: ScopeEventingFunctionManager

    Allows managing eventing functions on this scope.

    Allows managing eventing functions on this scope.

    For managing eventing functions at the admin scope ("*.*") level, see EventingFunctionManager, accessed from Cluster.eventingFunctions.

    Annotations
    @Uncommitted() @SinceCouchbase()
  6. def name: String

    The name of this scope.

  7. def query(statement: String, options: QueryOptions = QueryOptions()): Try[QueryResult]

    Performs a N1QL query against the cluster.

    Performs a N1QL query against the cluster.

    This is a blocking API. See Scope.async for an Future-based async version of this API, and Scope.reactive for a reactive version. The reactive version includes backpressure-aware row streaming.

    The reason to use this Scope-based variant over Cluster.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 QueryResult

  8. lazy val reactive: ReactiveScope

    Access a Reactive version of this API.

  9. def search(indexName: String, request: SearchRequest, options: SearchOptions): Try[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.

    This is blocking. See Cluster.reactive for a reactive streaming version of this API, and Cluster.async for an asynchronous version.

    indexName

    the name of the search index to use

    request

    the request to send to the FTS service.

    options

    see com.couchbase.client.scala.search.SearchOptions

    returns

    a Try containing a Success(SearchResult) (which includes any returned rows) if successful, else a Failure

    Annotations
    @SinceCouchbase()
  10. def search(indexName: String, request: SearchRequest): Try[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.

    This is blocking. See Cluster.reactive for a reactive streaming version of this API, and Cluster.async for an asynchronous version.

    indexName

    the name of the search index to use

    request

    the request to send to the FTS service.

    returns

    a Try containing a Success(SearchResult) (which includes any returned rows) if successful, else a Failure

    Annotations
    @SinceCouchbase()
  11. lazy val searchIndexes: ScopeSearchIndexManager

    Allows managing scoped FTS indexes.

    Allows managing scoped FTS indexes.

    Annotations
    @SinceCouchbase()