Click or drag to resize
IBucketInsertT Method (String, T, UInt32, ReplicateTo, PersistTo)
Inserts a document into the database for a given key, failing if it exists.

Namespace: Couchbase.Core
Assembly: Couchbase (in Couchbase.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
IOperationResult<T> Insert<T>(
	string key,
	T value,
	uint expiration,
	ReplicateTo replicateTo,
	PersistTo persistTo
)

Parameters

key
Type: SystemString
The unique key for indexing.
value
Type: T
The value for the key.
expiration
Type: SystemUInt32
The time-to-live (ttl) for the key in seconds.
replicateTo
Type: CouchbaseReplicateTo
The durability requirement for replication.
persistTo
Type: CouchbasePersistTo
The durability requirement for persistence.

Type Parameters

T
The Type of the value to be inserted.

Return Value

Type: IOperationResultT
An object implementing the IOperationResultTinterface.
See Also