HSET / HSETNX / HDEL

HSET / HSETNX

HSET
HSETNX
rhub add:action <group.eventId> <filterId> REDIS HSET

Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten. Source: Redis

YAML

-
id: my-action-id
async: false
type: REDIS
action: HSET
operation: null
serviceAccountId: my-redis-account-id
template:
key: the-redis-key-to-set
field: the-key-hash-field
stringify: true
value:
keyName: '{keyName}'
rhub add:action <group.eventId> <filterId> REDIS HSETNX

Sets field in the hash stored at key to value, only if field does not yet exist. If key does not exist, a new key holding a hash is created. If fieldalready exists, this operation has no effect. Source: Redis

YAML

-
id: my-action-id
async: false
type: REDIS
action: HSETNX
operation: null
serviceAccountId: my-redis-account-id
template:
key: the-redis-key-to-set
field: the-key-hash-field
stringify: true
value:
keyName: '{keyName}'

Property

Description

key

The key name, to create dynamic keys use wildcards.

field

The hash field name, to create dynamic fields use wildcards.

stringify

If true the value property will be stringified.

value

The key value. You can set plain text or JSON objects that will be stringified.

HDEL

rhub add:action <eventId> <filterId> REDIS HDEL

Removes the specified fields from the hash stored at key. Specified fields that do not exist within this hash are ignored. If key does not exist, it is treated as an empty hash and this command returns 0. Source: Redis

YAML

-
id: my-action-id
async: false
type: REDIS
action: HDEL
operation: null
serviceAccountId: my-redis-account-id
template:
key: the-redis-key-to-set
field: the-key-hash-field

Property

Description

key

The key name, to create dynamic keys use wildcards.

field

The hash field name, to create dynamic fields use wildcards.