Couchbase Transactions .NET | 1.1.0
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.Transactions.Config
    Assembly: Couchbase.Transactions.dll
    Syntax
    public static class Extensions

    Methods

    | Improve this Doc View Source

    QueryAsync<T>(AttemptContext, String, Action<TransactionQueryOptions>, IScope)

    Run a query in transaction mode.

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

    The statement to execute.

    Action<TransactionQueryOptions> configure

    An action to configure the options for this query.

    Couchbase.KeyValue.IScope scope

    The scope

    Returns
    Type Description
    Task<Couchbase.Query.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.

    | Improve this Doc View Source

    QueryAsync<T>(Transactions, String, Action<SingleQueryTransactionConfigBuilder>, IScope)

    Run a single query as a transaction.

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

    The statement to execute.

    Action<SingleQueryTransactionConfigBuilder> configure

    An action to configure this transaction.

    Couchbase.KeyValue.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.

    | Improve this Doc View Source

    QueryConfig(TransactionConfigBuilder, Action<TransactionQueryConfigBuilder>)

    Configuration builder for values related to Query.

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

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

    Returns
    Type Description
    TransactionConfigBuilder

    The original TransactionConfigBuilder.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021 Couchbase, Inc.