Redis Command
You can use this activity to create, read, update, and delete the data in different groups (data structures) like hashes, lists, sets, sorted sets, and strings.
Settings
The Settings tab has the following fields:
Field | Description |
---|---|
Connection | Lists all the connections created for connecting to the Redis server. |
Group | Lists the Redis command groups based on different data structures: Hashes, Lists, Sets, SortedSets, and Strings. |
Command | Lists all the commands provided for a selected Redis command group. |
Groups and commands
The tables below list all the groups and their associated commands with detailed description of each command.
Group | Command | Description |
---|---|---|
Hashes | HDEL | Deletes the specified fields, which exist within the stored hash. |
HEXISTS | Determines whether a hash field exists. | |
HGET | Returns the value associated with the specified hash field. | |
HGETALL | Returns all the specified fields and their associated values stored in the hash. | |
HKEYS | Returns all the field names in the hash stored at Key. | |
HLEN | Returns the number of fields stored in hash. | |
HMGET | Returns the values associated with the specified hash fields. | |
HMSET | Assigns the values to the specified fields in the hash. | |
HSET | Assigns the value to the specified field in the hash. | |
HSTRLEN | Returns the length of the value associated with the specified hash field. | |
HVALS | Returns all the values associated with hash fields. |
Group | Command | Description |
---|---|---|
Lists | LINDEX | Returns an element at a specified index from the list. |
LINSERT | Appends an element before or after the specified element in a list. | |
LPOP | Deletes the first element of the list and returns the deleted element. | |
LPUSH | Appends the specified elements at the head of the list. | |
LREM | Removes the elements from the list using
count as argument:
If count>0: Elements equal to the count value are removed moving from head to tail order of the list. If count<0: Elements equal to the count value are removed moving from tail to head order of the list. If count=0: Elements equal to count value are removed. |
|
LSET | Sets a value to the list element at specified index. | |
RPOP | Removes and returns the last element of the list. | |
RPUSH | Appends multiple elements at the tail of the list. |
Group | Command | Description |
---|---|---|
Sets | SADD | Adds the specified element to the set. |
SCARD | Returns the number of elements present in the set. | |
SMEMBERS | Returns all the elements of the set. | |
SISMEMBER | Determines whether the specified element exists in the specified set. | |
SPOP | Deletes the specified elements and returns the deleted elements from the set. | |
SREM | Removes the specified element from the set. | |
SMOVE | Moves the specified element from source set to destination set. |
Group | Command | Description |
---|---|---|
SortedSets | ZADD | Appends one or more elements to the sorted set. |
ZCARD | Specifies the number of elements in the sorted set. | |
ZCOUNT | Returns the number of elements from the sorted set within the specified range. | |
ZREM | Removes the specified elements from the sorted set. | |
ZRANGE | Returns all the elements specified within a range. | |
ZRANK | Determines and returns the rank of the specified element in the sorted set. | |
ZREMRANGEBYRANK | Removes all the elements within the range of specified indexes from the sorted set. | |
ZREMRANGEBYSCORE | Removes all the elements within the specified scores from the sorted set. |
Group | Command | Description |
---|---|---|
Strings | APPEND | Appends the value at the end of the string. |
GET | Returns the value of the specified key. | |
GETRANGE | Returns the part of the string that is specified by the start and end offsets of the string. | |
GETSET | Assigns new value to the key and returns the old stored value. | |
MGET | Returns the values assigned to specified keys. | |
MSET | Assigns the specified keys to their respective values. This command can assign values to all the specified keys at once. | |
SET | Sets the key to store the string value. | |
SETRANGE | Replaces a part of the string, which is specified within start and end offsets. | |
STRLEN | Returns the length of the string set. An error is displayed when the key holds value other than the string. |
Input
The Input tab displays the input schema of the activity in tree structure. The input displayed for this activity depends on the object that you select on the Settings tab. You can enter the input manually or map the input to the output from a preceding activity provided that the preceding activity has an output.
Field | Command | Description |
---|---|---|
Database Index | All commands | You can choose the Redis Database partition dynamically during a run-time by mapping database index from a previous activity or by hard-coding it.
Note: If the database index is not provided in the input schema then the value of
Default Database Index
field is retained from the Redis Connector dialog box and commands are executed on that partition.
|
Output
The Output tab displays the output schema of the activity in a tree structure. The output value is "read-only". The information in the schema varies based on the fields selected on the Settings tab. The properties that are displayed in the schema correspond to the output of the activity and can be used as input by subsequent activities in the flow.
Loop
If you would like this activity to iterate multiple times within the flow, enter an expression that evaluates to the iteration details. Select a type of iteration from the Type menu. The default type is None, which means the activity does not iterate. Refer to the "Using the Loop Feature in an Activity" topic in the TIBCO Flogo® Enterprise documentation.