Class MutateInOptions
Inherited Members
Namespace: Couchbase.KeyValue
Assembly: Couchbase.NetClient.dll
Syntax
public class MutateInOptions
Fields
| Edit this page View SourceDefaultReadOnly
Declaration
public static readonly MutateInOptions.ReadOnly DefaultReadOnly
Field Value
Type | Description |
---|---|
MutateInOptions.ReadOnly |
Methods
| Edit this page View SourceAccessDeleted(bool)
Allows access to a deleted document's attributes section. Only for internal diagnostic use only and is an unsupported feature.
Declaration
public MutateInOptions AccessDeleted(bool accessDeleted)
Parameters
Type | Name | Description |
---|---|---|
bool | accessDeleted |
Returns
Type | Description |
---|---|
MutateInOptions |
AsReadOnly()
Declaration
public MutateInOptions.ReadOnly AsReadOnly()
Returns
Type | Description |
---|---|
MutateInOptions.ReadOnly |
CancellationToken(CancellationToken)
A CancellationToken(CancellationToken) for cooperative cancellation.
Declaration
public MutateInOptions CancellationToken(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Cas(ulong)
Compare and Set value for optimistic locking of a document.
Declaration
public MutateInOptions Cas(ulong cas)
Parameters
Type | Name | Description |
---|---|---|
ulong | cas | A ulong value returned by the server in a previous operation. |
Returns
Type | Description |
---|---|
MutateInOptions | An options object for chaining. |
CreateAsDeleted(bool)
Declaration
public MutateInOptions CreateAsDeleted(bool createAsDeleted)
Parameters
Type | Name | Description |
---|---|---|
bool | createAsDeleted |
Returns
Type | Description |
---|---|
MutateInOptions |
Deconstruct(out TimeSpan, out StoreSemantics, out ulong, out (PersistTo, ReplicateTo), out DurabilityLevel, out TimeSpan?, out CancellationToken, out ITypeSerializer?, out bool, out bool, out IRetryStrategy?, out IRequestSpan?, out bool, out ITypeTranscoder?)
Declaration
public void Deconstruct(out TimeSpan expiry, out StoreSemantics storeSemantics, out ulong cas, out (PersistTo, ReplicateTo) durability, out DurabilityLevel durabilityLevel, out TimeSpan? timeout, out CancellationToken token, out ITypeSerializer? serializer, out bool createAsDeleted, out bool accessDeleted, out IRetryStrategy? retryStrategy, out IRequestSpan? requestSpan, out bool preserveTtl, out ITypeTranscoder? transcoder)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | expiry | |
StoreSemantics | storeSemantics | |
ulong | cas | |
(PersistTo, ReplicateTo) | durability | |
DurabilityLevel | durabilityLevel | |
TimeSpan? | timeout | |
CancellationToken | token | |
ITypeSerializer | serializer | |
bool | createAsDeleted | |
bool | accessDeleted | |
IRetryStrategy | retryStrategy | |
IRequestSpan | requestSpan | |
bool | preserveTtl | |
ITypeTranscoder | transcoder |
Durability(DurabilityLevel)
The durability level required for persisting a JSON document across the cluster.
Declaration
public MutateInOptions Durability(DurabilityLevel durabilityLevel)
Parameters
Type | Name | Description |
---|---|---|
DurabilityLevel | durabilityLevel | The DurabilityLevel required for persistance. |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Durability(PersistTo, ReplicateTo)
The durability level required for persisting a JSON document across the cluster.
Declaration
public MutateInOptions 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 |
---|---|
MutateInOptions | An options instance for chaining. |
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 MutateInOptions Expiry(TimeSpan expiry)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | expiry | The time-to-live of the document. |
Returns
Type | Description |
---|---|
MutateInOptions | An options object for chaining. |
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 MutateInOptions PreserveTtl(bool preserveTtl)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveTtl |
Returns
Type | Description |
---|---|
MutateInOptions | An options object for chaining. |
Remarks
The default is false.
RequestSpan(IRequestSpan)
Inject an external span which will the be the parent span of the internal span(s).
Declaration
public MutateInOptions RequestSpan(IRequestSpan span)
Parameters
Type | Name | Description |
---|---|---|
IRequestSpan | span | An IRequestSpan |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
RetryStrategy(IRetryStrategy)
Inject a custom IRetryStrategy.
Declaration
public MutateInOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
Type | Name | Description |
---|---|---|
IRetryStrategy | retryStrategy |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Serializer(ITypeSerializer?)
A custom ITypeSerializer implementation for serialization.
Declaration
[Obsolete("Use Transcoder instead.")]
public MutateInOptions Serializer(ITypeSerializer? serializer)
Parameters
Type | Name | Description |
---|---|---|
ITypeSerializer | serializer | A custom ITypeSerializer implementation for serialization. |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
StoreSemantics(StoreSemantics)
StoreSemantics - the storage action Replace - replace the document, fail if it doesn't exist Upsert - replace the document or create it if it doesn't exist (0x01) Insert - create document, fail if it exists(0x02)
Declaration
public MutateInOptions StoreSemantics(StoreSemantics storeSemantics)
Parameters
Type | Name | Description |
---|---|---|
StoreSemantics | storeSemantics |
Returns
Type | Description |
---|---|
MutateInOptions |
Timeout(TimeSpan)
The time in which the operation will timeout if it does not complete.
Declaration
public MutateInOptions Timeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Transcoder(ITypeTranscoder?)
Inject a ITypeTranscoder other than the default JsonTranscoder.
Declaration
public MutateInOptions Transcoder(ITypeTranscoder? transcoder)
Parameters
Type | Name | Description |
---|---|---|
ITypeTranscoder | transcoder |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |