Click or drag to resize
IBucketUpsertT Method (String, T, UInt64, UInt32)
Inserts or replaces an existing document into Couchbase Server.

Namespace: Couchbase.Core
Assembly: Couchbase (in Couchbase.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
IOperationResult<T> Upsert<T>(
	string key,
	T value,
	ulong cas,
	uint expiration
)

Parameters

key
Type: SystemString
The unique key for indexing.
value
Type: T
The value for the key.
cas
Type: SystemUInt64
The CAS (Check and Set) value for optimistic concurrency.
expiration
Type: SystemUInt32
The time-to-live (ttl) for the key in seconds.

Type Parameters

T
The Type of the value to be inserted.

Return Value

Type: IOperationResultT
An object implementing the IOperationResultTinterface.
See Also