Inserts or replaces an existing document into Couchbase Server.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
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.
- expiration
- Type: System TimeSpan
The time-to-live (ttl) for the key.
- replicateTo
- Type: Couchbase ReplicateTo
The durability requirement for replication.
- persistTo
- Type: Couchbase PersistTo
The durability requirement for persistence.
Type Parameters
- T
- The Type of the value to be inserted.
Return Value
Type: IOperationResult TAn object implementing the IOperationResult T interface.
Implements
IBucket Upsert T (String, T, UInt64, TimeSpan, ReplicateTo, PersistTo)See Also