Inserts a document into the database using a given key, failing if the key exists.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax public IOperationResult<T> Insert<T>(
string key,
T value
)
public IOperationResult<T> Insert<T>(
string key,
T value
)
Public Function Insert(Of T) (
key As String,
value As T
) As IOperationResult(Of T)
Public Function Insert(Of T) (
key As String,
value As T
) As IOperationResult(Of T)
public:
generic<typename T>
virtual IOperationResult<T>^ Insert(
String^ key,
T value
) sealed
public:
generic<typename T>
virtual IOperationResult<T>^ Insert(
String^ key,
T value
) sealed
abstract Insert :
key : string *
value : 'T -> IOperationResult<'T>
override Insert :
key : string *
value : 'T -> IOperationResult<'T>
abstract Insert :
key : string *
value : 'T -> IOperationResult<'T>
override Insert :
key : string *
value : 'T -> IOperationResult<'T>
Parameters
- key
- Type: System String
The unique key for indexing.
- value
- Type: T
The value for the key.
Type Parameters - T
- The Type of the value to be inserted.
Return Value
Type:
IOperationResult T An object implementing the
IOperationResult T interface.
Implements
IBucket Insert T (String, T)See Also