IBucketIncrement Method (String, UInt64, UInt64, UInt32) |
Increments the value of a key by the delta. If the key doesn't exist, it will be created
and seeded with the defaut initial value 1.
Namespace: Couchbase.CoreAssembly: Couchbase (in Couchbase.dll) Version: 1.0.0.0 (1.0.0.0)
SyntaxIOperationResult<long> Increment(
string key,
ulong delta,
ulong initial,
uint expiration
)
Function Increment (
key As String,
delta As ULong,
initial As ULong,
expiration As UInteger
) As IOperationResult(Of Long)
IOperationResult<long long>^ Increment(
String^ key,
unsigned long long delta,
unsigned long long initial,
unsigned int expiration
)
abstract Increment :
key : string *
delta : uint64 *
initial : uint64 *
expiration : uint32 -> IOperationResult<int64>
Parameters
- key
- Type: SystemString
The key to us for the counter. - delta
- Type: SystemUInt64
The number to increment the key by. - initial
- Type: SystemUInt64
The initial value to use. If the key doesn't exist, this value will returned. - expiration
- Type: SystemUInt32
The time-to-live (ttl) for the counter in seconds.
Return Value
Type:
IOperationResultInt64If the key doesn't exist, the server will respond with the initial value. If not the incremented value will be returned.
See Also