Decrements 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: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntaxpublic IOperationResult<ulong> Decrement(
string key,
ulong delta,
ulong initial,
uint expiration
)
public IOperationResult<ulong> Decrement(
string key,
ulong delta,
ulong initial,
uint expiration
)
Public Function Decrement (
key As String,
delta As ULong,
initial As ULong,
expiration As UInteger
) As IOperationResult(Of ULong)
Public Function Decrement (
key As String,
delta As ULong,
initial As ULong,
expiration As UInteger
) As IOperationResult(Of ULong)
public:
virtual IOperationResult<unsigned long long>^ Decrement(
String^ key,
unsigned long long delta,
unsigned long long initial,
unsigned int expiration
) sealed
public:
virtual IOperationResult<unsigned long long>^ Decrement(
String^ key,
unsigned long long delta,
unsigned long long initial,
unsigned int expiration
) sealed
abstract Decrement :
key : string *
delta : uint64 *
initial : uint64 *
expiration : uint32 -> IOperationResult<uint64>
override Decrement :
key : string *
delta : uint64 *
initial : uint64 *
expiration : uint32 -> IOperationResult<uint64>
abstract Decrement :
key : string *
delta : uint64 *
initial : uint64 *
expiration : uint32 -> IOperationResult<uint64>
override Decrement :
key : string *
delta : uint64 *
initial : uint64 *
expiration : uint32 -> IOperationResult<uint64>
Parameters
- key
- Type: System.String
The key to us for the counter.
- delta
- Type: System.UInt64
The number to increment the key by.
- initial
- Type: System.UInt64
The initial value to use. If the key doesn't exist, this value will returned.
- expiration
- Type: System.UInt32
The time-to-live (ttl) for the counter in seconds.
Return Value
Type:
IOperationResult<UInt64>If the key doesn't exist, the server will respond with the initial value. If not the decremented value will be returned.
Implements
IBucket.Decrement(String, UInt64, UInt64, UInt32)
RemarksExpirations over 30 * 24 * 60 * 60 (the amount of seconds in 30 days) are interpreted as a UNIX timestamp of the date at which the document expires.
see
documentation section about expiration.
See Also