Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class ClusterExtensions

Inheritance
object
ClusterExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase
Assembly: Couchbase.NetClient.dll
Syntax
public static class ClusterExtensions

Methods

View Source

AnalyticsQueryAsync<T>(ICluster, string, Action<AnalyticsOptions>)

Declaration
public static Task<IAnalyticsResult<T>> AnalyticsQueryAsync<T>(this ICluster cluster, string statement, Action<AnalyticsOptions> configureOptions)
Parameters
Type Name Description
ICluster cluster
string statement
Action<AnalyticsOptions> configureOptions
Returns
Type Description
Task<IAnalyticsResult<T>>
Type Parameters
Name Description
T
View Source

AnalyticsQuery<T>(ICluster, string, AnalyticsOptions)

Declaration
[Obsolete("Use the async version instead.")]
public static IAnalyticsResult<T> AnalyticsQuery<T>(this ICluster cluster, string statement, AnalyticsOptions options = null)
Parameters
Type Name Description
ICluster cluster
string statement
AnalyticsOptions options
Returns
Type Description
IAnalyticsResult<T>
Type Parameters
Name Description
T
View Source

AnalyticsQuery<T>(ICluster, string, Action<AnalyticsOptions>)

Declaration
[Obsolete("Use the async version instead.")]
public static IAnalyticsResult<T> AnalyticsQuery<T>(this ICluster cluster, string statement, Action<AnalyticsOptions> configureOptions)
Parameters
Type Name Description
ICluster cluster
string statement
Action<AnalyticsOptions> configureOptions
Returns
Type Description
IAnalyticsResult<T>
Type Parameters
Name Description
T
View Source

DiagnosticsAsync(ICluster, Action<DiagnosticsOptions>)

Declaration
public static Task<IDiagnosticsReport> DiagnosticsAsync(this ICluster cluster, Action<DiagnosticsOptions> configureOptions)
Parameters
Type Name Description
ICluster cluster
Action<DiagnosticsOptions> configureOptions
Returns
Type Description
Task<IDiagnosticsReport>
View Source

QueryAsync<T>(ICluster, string)

Declaration
public static Task<IQueryResult<T>> QueryAsync<T>(this ICluster cluster, string statement)
Parameters
Type Name Description
ICluster cluster
string statement
Returns
Type Description
Task<IQueryResult<T>>
Type Parameters
Name Description
T
View Source

QueryAsync<T>(ICluster, string, Action<QueryOptions>)

Declaration
public static Task<IQueryResult<T>> QueryAsync<T>(this ICluster cluster, string statement, Action<QueryOptions> configureOptions)
Parameters
Type Name Description
ICluster cluster
string statement
Action<QueryOptions> configureOptions
Returns
Type Description
Task<IQueryResult<T>>
Type Parameters
Name Description
T
View Source

QueryInterpolatedAsync<T>(ICluster, ref QueryInterpolatedStringHandler)

Executes an interpolated query.

Declaration
[InterfaceStability(Level.Volatile)]
public static Task<IQueryResult<T>> QueryInterpolatedAsync<T>(this ICluster cluster, ref QueryInterpolatedStringHandler handler)
Parameters
Type Name Description
ICluster cluster

Cluster against which to execute the query.

QueryInterpolatedStringHandler handler

The interpolated string.

Returns
Type Description
Task<IQueryResult<T>>

The query result.

Type Parameters
Name Description
T

Type of row returned by the query.

Remarks

Treats expressions in the interpolated string as positional parameters. This makes prepared queries with dynamic parameters very easy to build. Note that format strings and alignment are ignored. Also, you may only use expressions in locations in the query where parameters are acceptable.

This overload executes the query with AdHoc false, resulting in prepared queries.

View Source

QueryInterpolatedAsync<T>(ICluster, QueryOptions, ref QueryInterpolatedStringHandler)

Executes an interpolated query.

Declaration
[InterfaceStability(Level.Volatile)]
public static Task<IQueryResult<T>> QueryInterpolatedAsync<T>(this ICluster cluster, QueryOptions options, ref QueryInterpolatedStringHandler handler)
Parameters
Type Name Description
ICluster cluster

Cluster against which to execute the query.

QueryOptions options

Options to control query execution. Should not include any positional parameters.

QueryInterpolatedStringHandler handler

The interpolated string.

Returns
Type Description
Task<IQueryResult<T>>

The query result.

Type Parameters
Name Description
T

Type of row returned by the query.

Remarks

Treats expressions in the interpolated string as positional parameters. This makes prepared queries with dynamic parameters very easy to build. Note that format strings and alignment are ignored. Also, you may only use expressions in locations in the query where parameters are acceptable.

This overload does not default AdHoc to false like the other overloads. If you desire prepared queries, be sure to set AdHoc to false in options.

View Source

QueryInterpolatedAsync<T>(ICluster, Action<QueryOptions>, ref QueryInterpolatedStringHandler)

Executes an interpolated query.

Declaration
[InterfaceStability(Level.Volatile)]
public static Task<IQueryResult<T>> QueryInterpolatedAsync<T>(this ICluster cluster, Action<QueryOptions> configureOptions, ref QueryInterpolatedStringHandler handler)
Parameters
Type Name Description
ICluster cluster

Cluster against which to execute the query.

Action<QueryOptions> configureOptions

Action to configure the QueryOptions.

QueryInterpolatedStringHandler handler

The interpolated string.

Returns
Type Description
Task<IQueryResult<T>>

The query result.

Type Parameters
Name Description
T

Type of row returned by the query.

Remarks

Treats expressions in the interpolated string as positional parameters. This makes prepared queries with dynamic parameters very easy to build. Note that format strings and alignment are ignored. Also, you may only use expressions in locations in the query where parameters are acceptable.

This overload defaults AdHoc to false, resulting in prepared queries. This may be overridden in configureOptions.

View Source

SearchQueryAsync(ICluster, string, ISearchQuery, Action<SearchOptions>)

Declaration
public static Task<ISearchResult> SearchQueryAsync(this ICluster cluster, string indexName, ISearchQuery query, Action<SearchOptions> configureOptions)
Parameters
Type Name Description
ICluster cluster
string indexName
ISearchQuery query
Action<SearchOptions> configureOptions
Returns
Type Description
Task<ISearchResult>
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.