Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Class Extensions

    Extension methods with more convenient overloads for using options and configuration.

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

    Methods

    | Edit this page View Source

    QueryAsync<T>(AttemptContext, string, Action<TransactionQueryOptions>?, IScope?)

    Run a query in transaction mode.

    Declaration
    public static Task<IQueryResult<T>> QueryAsync<T>(this AttemptContext ctx, string statement, Action<TransactionQueryOptions>? configure = null, IScope? scope = null)
    Parameters
    Type Name Description
    AttemptContext ctx

    The AttemptContext to query from.

    string statement

    The statement to execute.

    Action<TransactionQueryOptions> configure

    An action to configure the options for this query.

    IScope scope

    The scope

    Returns
    Type Description
    Task<IQueryResult<T>>

    A SingleQueryTransactionResult<T> with the query results, if any.

    Type Parameters
    Name Description
    T

    The type of the result. Use object for queries with no results.

    Remarks

    IMPORTANT: Any KV operations after this query will be run via the query engine, which has performance implications.

    | Edit this page View Source

    QueryAsync<T>(Transactions, string, Action<SingleQueryTransactionConfigBuilder>?, IScope?)

    Run a single query as a transaction.

    Declaration
    public static Task<SingleQueryTransactionResult<T>> QueryAsync<T>(this Transactions transactions, string statement, Action<SingleQueryTransactionConfigBuilder>? configure = null, IScope? scope = null)
    Parameters
    Type Name Description
    Transactions transactions

    The transactions object to query from.

    string statement

    The statement to execute.

    Action<SingleQueryTransactionConfigBuilder> configure

    An action to configure this transaction.

    IScope scope

    The scope

    Returns
    Type Description
    Task<SingleQueryTransactionResult<T>>

    A SingleQueryTransactionResult<T> with the query results, if any.

    Type Parameters
    Name Description
    T

    The type of the result. Use object for queries with no results.

    | Edit this page View Source

    QueryConfig(TransactionsConfigBuilder, Action<TransactionQueryConfigBuilder>?)

    Configuration builder for values related to Query.

    Declaration
    public static TransactionsConfigBuilder QueryConfig(this TransactionsConfigBuilder config, Action<TransactionQueryConfigBuilder>? configure)
    Parameters
    Type Name Description
    TransactionsConfigBuilder config

    The config builder to modify.

    Action<TransactionQueryConfigBuilder> configure

    An action to invoke the TransactionQueryConfigBuilder to configure query options for transactions.

    Returns
    Type Description
    TransactionsConfigBuilder

    The original TransactionsConfigBuilder.

    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.