Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Class UpsertOptions

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

    Fields

    | Edit this page View Source

    DefaultReadOnly

    Declaration
    public static readonly UpsertOptions.ReadOnly DefaultReadOnly
    Field Value
    Type Description
    UpsertOptions.ReadOnly

    Methods

    | Edit this page View Source

    AsReadOnly()

    Declaration
    public UpsertOptions.ReadOnly AsReadOnly()
    Returns
    Type Description
    UpsertOptions.ReadOnly
    | Edit this page View Source

    CancellationToken(CancellationToken)

    A CancellationToken(CancellationToken) for cooperative cancellation.

    Declaration
    public UpsertOptions CancellationToken(CancellationToken token)
    Parameters
    Type Name Description
    CancellationToken token
    Returns
    Type Description
    UpsertOptions

    A UpsertOptions instance for chaining.

    | Edit this page View Source

    Deconstruct(out TimeSpan, out ReplicateTo, out PersistTo, out DurabilityLevel, out IRetryStrategy?, out IRequestSpan?, out bool, out TimeSpan?, out CancellationToken, out ITypeTranscoder?)

    Declaration
    public void Deconstruct(out TimeSpan expiry, out ReplicateTo replicateTo, out PersistTo persistTo, out DurabilityLevel durabilityLevel, out IRetryStrategy? retryStrategy, out IRequestSpan? requestSpan, out bool preserveTtl, out TimeSpan? timeout, out CancellationToken token, out ITypeTranscoder? transcoder)
    Parameters
    Type Name Description
    TimeSpan expiry
    ReplicateTo replicateTo
    PersistTo persistTo
    DurabilityLevel durabilityLevel
    IRetryStrategy retryStrategy
    IRequestSpan requestSpan
    bool preserveTtl
    TimeSpan? timeout
    CancellationToken token
    ITypeTranscoder transcoder
    | Edit this page View Source

    Durability(DurabilityLevel)

    The durability level required for persisting a JSON document across the cluster.

    Declaration
    public UpsertOptions Durability(DurabilityLevel durabilityLevel)
    Parameters
    Type Name Description
    DurabilityLevel durabilityLevel

    The DurabilityLevel required for persistance.

    Returns
    Type Description
    UpsertOptions

    An options instance for chaining.

    | Edit this page View Source

    Durability(PersistTo, ReplicateTo)

    The durability level required for persisting a JSON document across the cluster.

    Declaration
    public UpsertOptions Durability(PersistTo persistTo, ReplicateTo replicateTo)
    Parameters
    Type Name Description
    PersistTo persistTo

    The durability requirement for persistence.

    ReplicateTo replicateTo

    The durability requirement for replication.

    Returns
    Type Description
    UpsertOptions

    An options instance for chaining.

    | Edit this page View Source

    Expiry(TimeSpan)

    Sets the expiration for a document. By default, documents never expire - if overridden the value must be less than 50 years.

    Declaration
    public UpsertOptions Expiry(TimeSpan expiry)
    Parameters
    Type Name Description
    TimeSpan expiry

    The expiration for a document.

    Returns
    Type Description
    UpsertOptions

    An options instance for chaining.

    | Edit this page View Source

    PreserveTtl(bool)

    Specifies whether an existing document's expiry should be preserved. If true, and the document exists, its expiry will not be modified.Otherwise the document's expiry is determined by Expiry(TimeSpan).

    Declaration
    public UpsertOptions PreserveTtl(bool preserveTtl)
    Parameters
    Type Name Description
    bool preserveTtl
    Returns
    Type Description
    UpsertOptions

    An options object for chaining.

    Remarks

    The default is false.

    | Edit this page View Source

    RequestSpan(IRequestSpan)

    Inject an external span which will the be the parent span of the internal span(s).

    Declaration
    public UpsertOptions RequestSpan(IRequestSpan span)
    Parameters
    Type Name Description
    IRequestSpan span

    An IRequestSpan

    Returns
    Type Description
    UpsertOptions

    A UpsertOptions instance for chaining.

    | Edit this page View Source

    RetryStrategy(IRetryStrategy)

    Inject a custom IRetryStrategy.

    Declaration
    public UpsertOptions RetryStrategy(IRetryStrategy retryStrategy)
    Parameters
    Type Name Description
    IRetryStrategy retryStrategy
    Returns
    Type Description
    UpsertOptions

    A UpsertOptions instance for chaining.

    | Edit this page View Source

    Timeout(TimeSpan)

    The time in which the operation will timeout if it does not complete.

    Declaration
    public UpsertOptions Timeout(TimeSpan timeout)
    Parameters
    Type Name Description
    TimeSpan timeout
    Returns
    Type Description
    UpsertOptions

    A UpsertOptions instance for chaining.

    | Edit this page View Source

    Transcoder(ITypeTranscoder?)

    Inject a ITypeTranscoder other than the default JsonTranscoder.

    Declaration
    public UpsertOptions Transcoder(ITypeTranscoder? transcoder)
    Parameters
    Type Name Description
    ITypeTranscoder transcoder
    Returns
    Type Description
    UpsertOptions

    A UpsertOptions instance for chaining.

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