Updated on 2024-04-23 GMT+08:00

Redis

The Redis connector is used to connect to a Redis database, helping applications quickly and efficiently interact with the Redis database.

  • Redis is a high-performance key-value storage system. It is often used in scenarios such as caching, session management, real-time message transfer, and rankings. Redis supports multiple data structures, including strings, hash tables, lists, sets, and sorted sets. It also provides advanced functions such as transactions, publish/subscription, Lua script execution, persistence, and clustering.
  • The default Redis port number is 6379. The administrator can change the port number as required.

Creating a Redis Connection

  1. Log in to the new ROMA Connect console.
  2. In the navigation pane on the left, choose Connector. On the page displayed, click New Connection.
  3. Select the Redis connector.
  4. In the dialog box displayed, configure the connector and click OK.

    Parameter

    Description

    Name

    Enter the connector instance name.

    Host IP Address

    Enter the IP address of the database.

    Port

    Enter the port number to which the database is connected.

    Database

    Enter the name of the database to be connected.

    Password

    Password for connecting to the database.

    Description

    Enter the description of the connector to identify it.

Action

  • Basic operations on sorted sets
  • Basic operations on sets
  • Basic operations on hashes
  • Basic operations on lists
  • Basic operations on strings
  • Basic operations on keys
  • Basic operations on strings

Configuration Parameters

The following configuration is equivalent to the ZADD key score member command to add an element to a sorted set. key indicates the name of the sorted set, score indicates the score of the element, and member indicates the member value of the element. This configuration means to add the element apple to the sorted set myset and the score of this element is 3.

Parameter

Description

Sorted set

  • zadd
  • zrem
  • zcard
  • zrangebyscore/zrevrangebyscore
  • zrange/zrevrange
  • Key: name of the sorted set.
  • Value: member value of an element.
  • Score: score of an element.
  • Start Index: lowest score.
  • End Index: highest score.

Set

  • srem
  • sismember
  • srandmember
  • spop
  • sadd
  • Key: name of the set.
  • Value: member value of an element.

Hash

  • hdel
  • hlen
  • hset/hsetnx
  • hincrby
  • hget
  • hgetall
  • Key: name of the hash.
  • Field Name: value of the key in the hash.
  • Value: value corresponding to the key in the hash.
  • No operation is performed when the key exists: No: zset; Yes: zsetnx
  • Increment: adds a specified value to a numeric field in the hash.

List

  • lrange
  • lpop/rpop
  • lpush/rpush
  • lrem
  • llen
  • lindex
  • leset
  • Table Name: name of a data table in the database.
  • Data to Insert: value of each field in the target record of the insert operation.

String

  • set/setnx
  • append
  • setbit
  • get
  • incrby
  • decrby
  • getrange
  • strlen
  • Key: name of the character string.
  • Value: value of the character string.
  • Timeout (s): expiration time of the character string.
  • No operation is performed when the key exists: No: set; Yes: setnx

Key

  • del
  • lrem
  • expire
  • expireat
  • ttl
  • persist

Key: name of the key.