Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Interface IBucket

Inherited Members
IDisposable.Dispose()
IAsyncDisposable.DisposeAsync()
Namespace: Couchbase
Assembly: Couchbase.NetClient.dll
Syntax
public interface IBucket : IDisposable, IAsyncDisposable

Properties

View Source

Cluster

The cluster that owns this bucket.

Declaration
ICluster Cluster { get; }
Property Value
Type Description
ICluster
View Source

Collections

Declaration
ICouchbaseCollectionManager Collections { get; }
Property Value
Type Description
ICouchbaseCollectionManager
View Source

Name

Declaration
string Name { get; }
Property Value
Type Description
string
View Source

SupportsCollections

Declaration
bool SupportsCollections { get; }
Property Value
Type Description
bool
View Source

ViewIndexes

Declaration
[Obsolete("The View service has been deprecated use the Query service instead.")]
IViewIndexManager ViewIndexes { get; }
Property Value
Type Description
IViewIndexManager

Methods

View Source

Collection(string)

Declaration
ICouchbaseCollection Collection(string collectionName)
Parameters
Type Name Description
string collectionName
Returns
Type Description
ICouchbaseCollection
View Source

CollectionAsync(string)

Gets a collection from the default scope of the bucket by name.

Declaration
ValueTask<ICouchbaseCollection> CollectionAsync(string collectionName)
Parameters
Type Name Description
string collectionName

The name of the collection to fetch.

Returns
Type Description
ValueTask<ICouchbaseCollection>

A collection that belongs to the default scope of the bucket.

View Source

DefaultCollection()

Declaration
ICouchbaseCollection DefaultCollection()
Returns
Type Description
ICouchbaseCollection
View Source

DefaultCollectionAsync()

Gets the default collection for the bucket.

Declaration
ValueTask<ICouchbaseCollection> DefaultCollectionAsync()
Returns
Type Description
ValueTask<ICouchbaseCollection>

The default collection.

View Source

DefaultScope()

Declaration
IScope DefaultScope()
Returns
Type Description
IScope
View Source

DefaultScopeAsync()

Gets the default scope for the bucket.

Declaration
ValueTask<IScope> DefaultScopeAsync()
Returns
Type Description
ValueTask<IScope>

The default scope.

View Source

PingAsync(PingOptions?)

Actively performs I/O by application-level pinging services and returning their pinged status.

Declaration
Task<IPingReport> PingAsync(PingOptions? options = null)
Parameters
Type Name Description
PingOptions options

Optional arguments.

Returns
Type Description
Task<IPingReport>
View Source

Scope(string)

Declaration
IScope Scope(string scopeName)
Parameters
Type Name Description
string scopeName
Returns
Type Description
IScope
View Source

ScopeAsync(string)

Gets a scope from the bucket by name.

Declaration
ValueTask<IScope> ScopeAsync(string scopeName)
Parameters
Type Name Description
string scopeName

The name of the scope to fetch.

Returns
Type Description
ValueTask<IScope>

A scope that belongs to the bucket.

View Source

ViewQueryAsync<TKey, TValue>(string, string, ViewOptions?)

Execute a view query.

Declaration
[Obsolete("The View service has been deprecated use the Query service instead.")]
Task<IViewResult<TKey, TValue>> ViewQueryAsync<TKey, TValue>(string designDocument, string viewName, ViewOptions? options = null)
Parameters
Type Name Description
string designDocument

Design document name.

string viewName

View name.

ViewOptions options

ViewOptions controlling query execution.

Returns
Type Description
Task<IViewResult<TKey, TValue>>

An IViewResult<TKey, TValue>.

Type Parameters
Name Description
TKey

Type of the key for each result row.

TValue

Type of the value for each result row.

View Source

WaitUntilReadyAsync(TimeSpan, WaitUntilReadyOptions?)

Waits until a desired cluster state by default (“online”) is reached or times out.

Declaration
Task WaitUntilReadyAsync(TimeSpan timeout, WaitUntilReadyOptions? options = null)
Parameters
Type Name Description
TimeSpan timeout

The TimeSpan duration to wait before throwing an exception.

WaitUntilReadyOptions options

Optional arguments.

Returns
Type Description
Task

Extension Methods

BucketExtensions.PingAsync(IBucket, params ServiceType[])
BucketExtensions.PingAsync(IBucket, Action<PingOptions>)
BucketExtensions.PingAsync(IBucket, string, params ServiceType[])
BucketExtensions.ViewQueryAsync<TKey, TValue>(IBucket, string, string)
BucketExtensions.ViewQueryAsync<TKey, TValue>(IBucket, string, string, Action<ViewOptions>)
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.