Home / node / Commands / type-aliases / SetOptions @valkey/valkey-glide
@valkey/valkey-glide / Commands / SetOptions
Type Alias: SetOptions
SetOptions = {
conditionalSet?
:"onlyIfExists"
|"onlyIfDoesNotExist"
; } | {comparisonValue
:GlideString
;conditionalSet
:"onlyIfEqual"
; } &object
Type declaration
expiry?
optional
expiry:"keepExisting"
| {count
:number
;type
:TimeUnit
; }
If not set, no expiry time will be set for the value.
keepExisting
- Retain the time to live associated with the key.
Equivalent to KEEPTTL
in the Valkey API.
returnOldValue?
optional
returnOldValue:boolean
Return the old string stored at key, or nil if key did not exist. An error
is returned and SET aborted if the value stored at key is not a string.
Equivalent to GET
in the Valkey API.