Inserts or replaces an existing document into Couchbase Server as an asynchronous operation.
Namespace: Couchbase.CoreAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.1.0.0 (2.1.0.0)
Syntax Task<IOperationResult<T>> UpsertAsync<T>(
string key,
T value,
ulong cas
)
Task<IOperationResult<T>> UpsertAsync<T>(
string key,
T value,
ulong cas
)
Function UpsertAsync(Of T) (
key As String,
value As T,
cas As ULong
) As Task(Of IOperationResult(Of T))
Function UpsertAsync(Of T) (
key As String,
value As T,
cas As ULong
) As Task(Of IOperationResult(Of T))
generic<typename T>
Task<IOperationResult<T>^>^ UpsertAsync(
String^ key,
T value,
unsigned long long cas
)
generic<typename T>
Task<IOperationResult<T>^>^ UpsertAsync(
String^ key,
T value,
unsigned long long cas
)
abstract UpsertAsync :
key : string *
value : 'T *
cas : uint64 -> Task<IOperationResult<'T>>
abstract UpsertAsync :
key : string *
value : 'T *
cas : uint64 -> Task<IOperationResult<'T>>
Parameters
- key
- Type: System String
The unique key for indexing.
- value
- Type: T
The value for the key.
- cas
- Type: System UInt64
The CAS (Check and Set) value for optimistic concurrency.
Type Parameters - T
- The Type of the value to be inserted.
Return Value
Type:
Task IOperationResult T The
Task TResult object representing the asynchronous operation.
See Also