NWNX:EE  8193.36.12
nwnx_redis_short.nss File Reference
#include "nwnx"
#include "nwnx_redis_lib"

Go to the source code of this file.

Functions

int APPEND (string key, string value)
 
int AUTH (string password)
 
int BGREWRITEAOF ()
 
int BGSAVE ()
 
int BITCOUNT (string key, int start=0, int end=0)
 
int BITFIELD (string key, string get_type="", int get_offset=0, string set_type="", int set_offset=0, int set_value=0, string incrby_type="", int incrby_offset=0, int incrby_increment=0)
 
int BITOP (string operation, string destkey, string key)
 
int BITPOS (string key, int bit, int start=0, int end=0)
 
int BLPOP (string key, int timeout)
 
int BRPOP (string key, int timeout)
 
int BRPOPLPUSH (string source, string destination, int timeout)
 
int BZPOPMIN (string key, int timeout)
 
int BZPOPMAX (string key, int timeout)
 
int CLIENT_ID ()
 
int CLIENT_KILL (string ip_port="", int id_client_id=0, string addr_ip_port="", string skipme_yes_no="")
 
int CLIENT_LIST ()
 
int CLIENT_GETNAME ()
 
int CLIENT_PAUSE (int timeout)
 
int CLIENT_REPLY (string reply_mode)
 
int CLIENT_SETNAME (string connection_name)
 
int CLIENT_UNBLOCK (string client_id, string unblock_type="")
 
int CLUSTER_ADDSLOTS (int slot)
 
int CLUSTER_COUNT_FAILURE_REPORTS (string node_id)
 
int CLUSTER_COUNTKEYSINSLOT (int slot)
 
int CLUSTER_DELSLOTS (int slot)
 
int CLUSTER_FAILOVER (string options="")
 
int CLUSTER_FORGET (string node_id)
 
int CLUSTER_GETKEYSINSLOT (int slot, int count)
 
int CLUSTER_INFO ()
 
int CLUSTER_KEYSLOT (string key)
 
int CLUSTER_MEET (string ip, int port)
 
int CLUSTER_NODES ()
 
int CLUSTER_REPLICATE (string node_id)
 
int CLUSTER_RESET (string reset_type="")
 
int CLUSTER_SAVECONFIG ()
 
int CLUSTER_SET_CONFIG_EPOCH (int config_epoch)
 
int CLUSTER_SETSLOT (int slot, string subcommand, string node_id="")
 
int CLUSTER_SLAVES (string node_id)
 
int CLUSTER_REPLICAS (string node_id)
 
int CLUSTER_SLOTS ()
 
int COMMAND ()
 
int COMMAND_COUNT ()
 
int COMMAND_GETKEYS ()
 
int COMMAND_INFO (string command_name)
 
int CONFIG_GET (string parameter)
 
int CONFIG_REWRITE ()
 
int CONFIG_SET (string parameter, string value)
 
int CONFIG_RESETSTAT ()
 
int DBSIZE ()
 
int DEBUG_OBJECT (string key)
 
int DEBUG_SEGFAULT ()
 
int DECR (string key)
 
int DECRBY (string key, int decrement)
 
int DEL (string key)
 
int DISCARD ()
 
int DUMP (string key)
 
int ECHO (string message)
 
int EVAL (string script, int numkeys, string key, string arg)
 
int EVALSHA (string sha1, int numkeys, string key, string arg)
 
int EXEC ()
 
int EXISTS (string key)
 
int EXPIRE (string key, int seconds)
 
int EXPIREAT (string key, string timestamp)
 
int FLUSHALL (string async="")
 
int FLUSHDB (string async="")
 
int GEOADD (string key, float longitude, float latitude, string member)
 
int GEOHASH (string key, string member)
 
int GEOPOS (string key, string member)
 
int GEODIST (string key, string member1, string member2, string unit="")
 
int GEORADIUS (string key, float longitude, float latitude, float radius, string unit, string withcoord="", string withdist="", string withhash="", int count_count=0, string order="", string store_key="", string storedist_key="")
 
int GEORADIUSBYMEMBER (string key, string member, float radius, string unit, string withcoord="", string withdist="", string withhash="", int count_count=0, string order="", string store_key="", string storedist_key="")
 
int GET (string key)
 
int GETBIT (string key, int offset)
 
int GETRANGE (string key, int start, int end)
 
int GETSET (string key, string value)
 
int HDEL (string key, string field)
 
int HEXISTS (string key, string field)
 
int HGET (string key, string field)
 
int HGETALL (string key)
 
int HINCRBY (string key, string field, int increment)
 
int HINCRBYFLOAT (string key, string field, float increment)
 
int HKEYS (string key)
 
int HLEN (string key)
 
int HMGET (string key, string field)
 
int HMSET (string key, string field, string value)
 
int HSET (string key, string field, string value)
 
int HSETNX (string key, string field, string value)
 
int HSTRLEN (string key, string field)
 
int HVALS (string key)
 
int INCR (string key)
 
int INCRBY (string key, int increment)
 
int INCRBYFLOAT (string key, float increment)
 
int INFO (string section="")
 
int KEYS (string pattern)
 
int LASTSAVE ()
 
int LINDEX (string key, int index)
 
int LINSERT (string key, string where, string pivot, string value)
 
int LLEN (string key)
 
int LPOP (string key)
 
int LPUSH (string key, string value)
 
int LPUSHX (string key, string value)
 
int LRANGE (string key, int start, int stop)
 
int LREM (string key, int count, string value)
 
int LSET (string key, int index, string value)
 
int LTRIM (string key, int start, int stop)
 
int MEMORY_DOCTOR ()
 
int MEMORY_HELP ()
 
int MEMORY_MALLOC_STATS ()
 
int MEMORY_PURGE ()
 
int MEMORY_STATS ()
 
int MEMORY_USAGE (string key, int samples_count=0)
 
int MGET (string key)
 
int MIGRATE (string host, string port, string key, int destination_db, int timeout, string copy="", string replace="", string auth_password="", string keys_key="")
 
int MONITOR ()
 
int MOVE (string key, int db)
 
int MSET (string key, string value)
 
int MSETNX (string key, string value)
 
int MULTI ()
 
int OBJECT (string subcommand, string arguments="")
 
int PERSIST (string key)
 
int PEXPIRE (string key, int milliseconds)
 
int PEXPIREAT (string key, string milliseconds_timestamp)
 
int PFADD (string key, string element)
 
int PFCOUNT (string key)
 
int PFMERGE (string destkey, string sourcekey)
 
int PING (string message="")
 
int PSETEX (string key, int milliseconds, string value)
 
int PUBSUB (string subcommand, string argument="")
 
int PTTL (string key)
 
int PUBLISH (string channel, string message)
 
int QUIT ()
 
int RANDOMKEY ()
 
int READONLY ()
 
int READWRITE ()
 
int RENAME (string key, string newkey)
 
int RENAMENX (string key, string newkey)
 
int RESTORE (string key, int ttl, string serialized_value, string replace="", string absttl="", int idletime_seconds=0, int freq_frequency=0)
 
int ROLE ()
 
int RPOP (string key)
 
int RPOPLPUSH (string source, string destination)
 
int RPUSH (string key, string value)
 
int RPUSHX (string key, string value)
 
int SADD (string key, string member)
 
int SAVE ()
 
int SCARD (string key)
 
int SCRIPT_DEBUG (string mode)
 
int SCRIPT_EXISTS (string sha1)
 
int SCRIPT_FLUSH ()
 
int SCRIPT_KILL ()
 
int SCRIPT_LOAD (string script)
 
int SDIFF (string key)
 
int SDIFFSTORE (string destination, string key)
 
int SELECT (int index)
 
int SET (string key, string value, string condition="")
 
int SETBIT (string key, int offset, string value)
 
int SETEX (string key, int seconds, string value)
 
int SETNX (string key, string value)
 
int SETRANGE (string key, int offset, string value)
 
int SHUTDOWN (string save_mode="")
 
int SINTER (string key)
 
int SINTERSTORE (string destination, string key)
 
int SISMEMBER (string key, string member)
 
int SLAVEOF (string host, string port)
 
int REPLICAOF (string host, string port)
 
int SLOWLOG (string subcommand, string argument="")
 
int SMEMBERS (string key)
 
int SMOVE (string source, string destination, string member)
 
int SORT (string key, string by_pattern="", int limit_offset=0, int limit_count=0, string get_pattern="", string order="", string sorting="", string store_destination="")
 
int SPOP (string key, int count=0)
 
int SRANDMEMBER (string key, int count=0)
 
int SREM (string key, string member)
 
int STRLEN (string key)
 
int SUNION (string key)
 
int SUNIONSTORE (string destination, string key)
 
int SWAPDB (int index, int index_1)
 
int SYNC ()
 
int TIME ()
 
int TOUCH (string key)
 
int TTL (string key)
 
int TYPE (string key)
 
int UNLINK (string key)
 
int UNWATCH ()
 
int WAIT (int numreplicas, int timeout)
 
int WATCH (string key)
 
int ZADD (string key, string condition="", string change="", string increment="", float score=0.0, string member="")
 
int ZCARD (string key)
 
int ZCOUNT (string key, float min, float max)
 
int ZINCRBY (string key, int increment, string member)
 
int ZINTERSTORE (string destination, int numkeys, string key, int weights_weight=0, string aggregate_aggregate="")
 
int ZLEXCOUNT (string key, string min, string max)
 
int ZPOPMAX (string key, int count=0)
 
int ZPOPMIN (string key, int count=0)
 
int ZRANGE (string key, int start, int stop, string withscores="")
 
int ZRANGEBYLEX (string key, string min, string max, int limit_offset=0, int limit_count=0)
 
int ZREVRANGEBYLEX (string key, string max, string min, int limit_offset=0, int limit_count=0)
 
int ZRANGEBYSCORE (string key, float min, float max, string withscores="", int limit_offset=0, int limit_count=0)
 
int ZRANK (string key, string member)
 
int ZREM (string key, string member)
 
int ZREMRANGEBYLEX (string key, string min, string max)
 
int ZREMRANGEBYRANK (string key, int start, int stop)
 
int ZREMRANGEBYSCORE (string key, float min, float max)
 
int ZREVRANGE (string key, int start, int stop, string withscores="")
 
int ZREVRANGEBYSCORE (string key, float max, float min, string withscores="", int limit_offset=0, int limit_count=0)
 
int ZREVRANK (string key, string member)
 
int ZSCORE (string key, string member)
 
int ZUNIONSTORE (string destination, int numkeys, string key, int weights_weight=0, string aggregate_aggregate="")
 
int SCAN (int cursor, string match_pattern="", int count_count=0, string type_type="")
 
int SSCAN (string key, int cursor, string match_pattern="", int count_count=0)
 
int HSCAN (string key, int cursor, string match_pattern="", int count_count=0)
 
int ZSCAN (string key, int cursor, string match_pattern="", int count_count=0)
 
int XINFO (string consumers_key="", string consumers_groupname="", string groups_key="", string stream_key="", string help="")
 
int XADD (string key, string ID, string field, string str)
 
int XTRIM (string key, string strategy, string approx="", int count=0)
 
int XDEL (string key, string ID)
 
int XRANGE (string key, string start, string end, int count_count=0)
 
int XREVRANGE (string key, string end, string start, int count_count=0)
 
int XLEN (string key)
 
int XREAD (int count_count=0, int block_milliseconds=0, string streams="", string key="", string ID="")
 
int XGROUP (string create_key="", string create_groupname="", string create_id_or__="", string setid_key="", string setid_groupname="", string setid_id_or__="", string destroy_key="", string destroy_groupname="", string delconsumer_key="", string delconsumer_groupname="", string delconsumer_consumername="")
 
int XREADGROUP (string group_group, string group_consumer, int count_count=0, int block_milliseconds=0, string noack="", string streams="", string key="", string ID="")
 
int XACK (string key, string group, string ID)
 
int XCLAIM (string key, string group, string consumer, string min_idle_time, string ID, int idle_ms=0, int time_ms_unix_time=0, int retrycount_count=0)
 
int XPENDING (string key, string group, string start="", string end="", int count=0, string consumer="")
 

Function Documentation

◆ APPEND()

int APPEND ( string  key,
string  value 
)

APPEND

Append a value to a key

Time complexity: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation. Annotated return value: integer

Definition at line 3229 of file nwnx_redis_short.nss.

◆ AUTH()

int AUTH ( string  password)

AUTH

Authenticate to the server Annotated return value: simple-string

Definition at line 3240 of file nwnx_redis_short.nss.

◆ BGREWRITEAOF()

int BGREWRITEAOF ( )

BGREWRITEAOF

Asynchronously rewrite the append-only file Annotated return value: simple-string

Definition at line 3249 of file nwnx_redis_short.nss.

◆ BGSAVE()

int BGSAVE ( )

BGSAVE

Asynchronously save the dataset to disk Annotated return value: simple-string

Definition at line 3255 of file nwnx_redis_short.nss.

◆ BITCOUNT()

int BITCOUNT ( string  key,
int  start = 0,
int  end = 0 
)

BITCOUNT

Count set bits in a string

Time complexity: O(N) Annotated return value: integer

Definition at line 3261 of file nwnx_redis_short.nss.

◆ BITFIELD()

int BITFIELD ( string  key,
string  get_type = "",
int  get_offset = 0,
string  set_type = "",
int  set_offset = 0,
int  set_value = 0,
string  incrby_type = "",
int  incrby_offset = 0,
int  incrby_increment = 0 
)

BITFIELD

Perform arbitrary bitfield integer operations on strings

Time complexity: O(1) for each subcommand specified Annotated return value:

Definition at line 3276 of file nwnx_redis_short.nss.

◆ BITOP()

int BITOP ( string  operation,
string  destkey,
string  key 
)

BITOP

Perform bitwise operations between strings

Time complexity: O(N) Annotated return value: integer

Definition at line 3309 of file nwnx_redis_short.nss.

◆ BITPOS()

int BITPOS ( string  key,
int  bit,
int  start = 0,
int  end = 0 
)

BITPOS

Find first bit set or clear in a string

Time complexity: O(N) Annotated return value: integer

Definition at line 3323 of file nwnx_redis_short.nss.

◆ BLPOP()

int BLPOP ( string  key,
int  timeout 
)

BLPOP

Remove and get the first element in a list, or block until one is available

Time complexity: O(1) Annotated return value: array

Definition at line 3341 of file nwnx_redis_short.nss.

◆ BRPOP()

int BRPOP ( string  key,
int  timeout 
)

BRPOP

Remove and get the last element in a list, or block until one is available

Time complexity: O(1) Annotated return value: array

Definition at line 3353 of file nwnx_redis_short.nss.

◆ BRPOPLPUSH()

int BRPOPLPUSH ( string  source,
string  destination,
int  timeout 
)

BRPOPLPUSH

Pop a value from a list, push it to another list and return it; or block until one is available

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 3365 of file nwnx_redis_short.nss.

◆ BZPOPMIN()

int BZPOPMIN ( string  key,
int  timeout 
)

BZPOPMIN

Remove and return the member with the lowest score from one or more sorted sets, or block until one is available

Time complexity: O(log(N)) with N being the number of elements in the sorted set. Annotated return value: array

Definition at line 3381 of file nwnx_redis_short.nss.

◆ BZPOPMAX()

int BZPOPMAX ( string  key,
int  timeout 
)

BZPOPMAX

Remove and return the member with the highest score from one or more sorted sets, or block until one is available

Time complexity: O(log(N)) with N being the number of elements in the sorted set. Annotated return value: array

Definition at line 3393 of file nwnx_redis_short.nss.

◆ CLIENT_ID()

int CLIENT_ID ( )

CLIENT_ID

Returns the client ID for the current connection

Time complexity: O(1) Annotated return value:

Definition at line 3405 of file nwnx_redis_short.nss.

◆ CLIENT_KILL()

int CLIENT_KILL ( string  ip_port = "",
int  id_client_id = 0,
string  addr_ip_port = "",
string  skipme_yes_no = "" 
)

CLIENT_KILL

Kill the connection of a client

Time complexity: O(N) where N is the number of client connections Annotated return value: simple-string

Definition at line 3411 of file nwnx_redis_short.nss.

◆ CLIENT_LIST()

int CLIENT_LIST ( )

CLIENT_LIST

Get the list of client connections

Time complexity: O(N) where N is the number of client connections Annotated return value: bulk-string

Definition at line 3427 of file nwnx_redis_short.nss.

◆ CLIENT_GETNAME()

int CLIENT_GETNAME ( )

CLIENT_GETNAME

Get the current connection name

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 3433 of file nwnx_redis_short.nss.

◆ CLIENT_PAUSE()

int CLIENT_PAUSE ( int  timeout)

CLIENT_PAUSE

Stop processing commands from clients for some time

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3439 of file nwnx_redis_short.nss.

◆ CLIENT_REPLY()

int CLIENT_REPLY ( string  reply_mode)

CLIENT_REPLY

Instruct the server whether to reply to commands

Time complexity: O(1)

  • Valid values for reply_mode: "ON", "OFF", "SKIP" Annotated return value: simple-string

Definition at line 3449 of file nwnx_redis_short.nss.

◆ CLIENT_SETNAME()

int CLIENT_SETNAME ( string  connection_name)

CLIENT_SETNAME

Set the current connection name

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3459 of file nwnx_redis_short.nss.

◆ CLIENT_UNBLOCK()

int CLIENT_UNBLOCK ( string  client_id,
string  unblock_type = "" 
)

CLIENT_UNBLOCK

Unblock a client blocked in a blocking command from a different connection

Time complexity: O(log N) where N is the number of client connections

  • Valid values for unblock_type: "TIMEOUT", "ERROR" Annotated return value:

Definition at line 3468 of file nwnx_redis_short.nss.

◆ CLUSTER_ADDSLOTS()

int CLUSTER_ADDSLOTS ( int  slot)

CLUSTER_ADDSLOTS

Assign new hash slots to receiving node

Time complexity: O(N) where N is the total number of hash slot arguments Annotated return value: simple-string

Definition at line 3480 of file nwnx_redis_short.nss.

◆ CLUSTER_COUNT_FAILURE_REPORTS()

int CLUSTER_COUNT_FAILURE_REPORTS ( string  node_id)

CLUSTER_COUNT_FAILURE_REPORTS

Return the number of failure reports active for a given node

Time complexity: O(N) where N is the number of failure reports Annotated return value: integer

Definition at line 3490 of file nwnx_redis_short.nss.

◆ CLUSTER_COUNTKEYSINSLOT()

int CLUSTER_COUNTKEYSINSLOT ( int  slot)

CLUSTER_COUNTKEYSINSLOT

Return the number of local keys in the specified hash slot

Time complexity: O(1) Annotated return value: integer

Definition at line 3499 of file nwnx_redis_short.nss.

◆ CLUSTER_DELSLOTS()

int CLUSTER_DELSLOTS ( int  slot)

CLUSTER_DELSLOTS

Set hash slots as unbound in receiving node

Time complexity: O(N) where N is the total number of hash slot arguments Annotated return value: simple-string

Definition at line 3509 of file nwnx_redis_short.nss.

◆ CLUSTER_FAILOVER()

int CLUSTER_FAILOVER ( string  options = "")

CLUSTER_FAILOVER

Forces a replica to perform a manual failover of its master.

Time complexity: O(1)

  • Valid values for options: "FORCE", "TAKEOVER" Annotated return value: simple-string

Definition at line 3519 of file nwnx_redis_short.nss.

◆ CLUSTER_FORGET()

int CLUSTER_FORGET ( string  node_id)

CLUSTER_FORGET

Remove a node from the nodes table

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3529 of file nwnx_redis_short.nss.

◆ CLUSTER_GETKEYSINSLOT()

int CLUSTER_GETKEYSINSLOT ( int  slot,
int  count 
)

CLUSTER_GETKEYSINSLOT

Return local key names in the specified hash slot

Time complexity: O(log(N)) where N is the number of requested keys Annotated return value: array

Definition at line 3538 of file nwnx_redis_short.nss.

◆ CLUSTER_INFO()

int CLUSTER_INFO ( )

CLUSTER_INFO

Provides info about Redis Cluster node state

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 3551 of file nwnx_redis_short.nss.

◆ CLUSTER_KEYSLOT()

int CLUSTER_KEYSLOT ( string  key)

CLUSTER_KEYSLOT

Returns the hash slot of the specified key

Time complexity: O(N) where N is the number of bytes in the key Annotated return value: integer

Definition at line 3557 of file nwnx_redis_short.nss.

◆ CLUSTER_MEET()

int CLUSTER_MEET ( string  ip,
int  port 
)

CLUSTER_MEET

Force a node cluster to handshake with another node

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3566 of file nwnx_redis_short.nss.

◆ CLUSTER_NODES()

int CLUSTER_NODES ( )

CLUSTER_NODES

Get Cluster config for the node

Time complexity: O(N) where N is the total number of Cluster nodes Annotated return value: bulk-string

Definition at line 3578 of file nwnx_redis_short.nss.

◆ CLUSTER_REPLICATE()

int CLUSTER_REPLICATE ( string  node_id)

CLUSTER_REPLICATE

Reconfigure a node as a replica of the specified master node

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3584 of file nwnx_redis_short.nss.

◆ CLUSTER_RESET()

int CLUSTER_RESET ( string  reset_type = "")

CLUSTER_RESET

Reset a Redis Cluster node

Time complexity: O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.

  • Valid values for reset_type: "HARD", "SOFT" Annotated return value: simple-string

Definition at line 3593 of file nwnx_redis_short.nss.

◆ CLUSTER_SAVECONFIG()

int CLUSTER_SAVECONFIG ( )

CLUSTER_SAVECONFIG

Forces the node to save cluster state on disk

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3603 of file nwnx_redis_short.nss.

◆ CLUSTER_SET_CONFIG_EPOCH()

int CLUSTER_SET_CONFIG_EPOCH ( int  config_epoch)

CLUSTER_SET_CONFIG_EPOCH

Set the configuration epoch in a new node

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3609 of file nwnx_redis_short.nss.

◆ CLUSTER_SETSLOT()

int CLUSTER_SETSLOT ( int  slot,
string  subcommand,
string  node_id = "" 
)

CLUSTER_SETSLOT

Bind a hash slot to a specific node

Time complexity: O(1)

  • Valid values for subcommand: "IMPORTING", "MIGRATING", "STABLE", "NODE" Annotated return value: simple-string

Definition at line 3619 of file nwnx_redis_short.nss.

◆ CLUSTER_SLAVES()

int CLUSTER_SLAVES ( string  node_id)

CLUSTER_SLAVES

List replica nodes of the specified master node

Time complexity: O(1) Annotated return value:

Definition at line 3634 of file nwnx_redis_short.nss.

◆ CLUSTER_REPLICAS()

int CLUSTER_REPLICAS ( string  node_id)

CLUSTER_REPLICAS

List replica nodes of the specified master node

Time complexity: O(1) Annotated return value:

Definition at line 3643 of file nwnx_redis_short.nss.

◆ CLUSTER_SLOTS()

int CLUSTER_SLOTS ( )

CLUSTER_SLOTS

Get array of Cluster slot to node mappings

Time complexity: O(N) where N is the total number of Cluster nodes Annotated return value: array

Definition at line 3652 of file nwnx_redis_short.nss.

◆ COMMAND()

int COMMAND ( )

COMMAND

Get array of Redis command details

Time complexity: O(N) where N is the total number of Redis commands Annotated return value: array

Definition at line 3658 of file nwnx_redis_short.nss.

◆ COMMAND_COUNT()

int COMMAND_COUNT ( )

COMMAND_COUNT

Get total number of Redis commands

Time complexity: O(1) Annotated return value: integer

Definition at line 3664 of file nwnx_redis_short.nss.

◆ COMMAND_GETKEYS()

int COMMAND_GETKEYS ( )

COMMAND_GETKEYS

Extract keys given a full Redis command

Time complexity: O(N) where N is the number of arguments to the command Annotated return value: array

Definition at line 3670 of file nwnx_redis_short.nss.

◆ COMMAND_INFO()

int COMMAND_INFO ( string  command_name)

COMMAND_INFO

Get array of specific Redis command details

Time complexity: O(N) when N is number of commands to look up Annotated return value: array

Definition at line 3676 of file nwnx_redis_short.nss.

◆ CONFIG_GET()

int CONFIG_GET ( string  parameter)

CONFIG_GET

Get the value of a configuration parameter Annotated return value: array

Definition at line 3685 of file nwnx_redis_short.nss.

◆ CONFIG_REWRITE()

int CONFIG_REWRITE ( )

CONFIG_REWRITE

Rewrite the configuration file with the in memory configuration Annotated return value: simple-string

Definition at line 3694 of file nwnx_redis_short.nss.

◆ CONFIG_SET()

int CONFIG_SET ( string  parameter,
string  value 
)

CONFIG_SET

Set a configuration parameter to the given value Annotated return value: simple-string

Definition at line 3700 of file nwnx_redis_short.nss.

◆ CONFIG_RESETSTAT()

int CONFIG_RESETSTAT ( )

CONFIG_RESETSTAT

Reset the stats returned by INFO

Time complexity: O(1) Annotated return value: simple-string

Definition at line 3711 of file nwnx_redis_short.nss.

◆ DBSIZE()

int DBSIZE ( )

DBSIZE

Return the number of keys in the selected database Annotated return value: integer

Definition at line 3717 of file nwnx_redis_short.nss.

◆ DEBUG_OBJECT()

int DEBUG_OBJECT ( string  key)

DEBUG_OBJECT

Get debugging information about a key Annotated return value: simple-string

Definition at line 3723 of file nwnx_redis_short.nss.

◆ DEBUG_SEGFAULT()

int DEBUG_SEGFAULT ( )

DEBUG_SEGFAULT

Make the server crash Annotated return value: simple-string

Definition at line 3732 of file nwnx_redis_short.nss.

◆ DECR()

int DECR ( string  key)

DECR

Decrement the integer value of a key by one

Time complexity: O(1) Annotated return value: integer

Definition at line 3738 of file nwnx_redis_short.nss.

◆ DECRBY()

int DECRBY ( string  key,
int  decrement 
)

DECRBY

Decrement the integer value of a key by the given number

Time complexity: O(1) Annotated return value: integer

Definition at line 3747 of file nwnx_redis_short.nss.

◆ DEL()

int DEL ( string  key)

DEL

Delete a key

Time complexity: O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1). Annotated return value: integer

Definition at line 3759 of file nwnx_redis_short.nss.

◆ DISCARD()

int DISCARD ( )

DISCARD

Discard all commands issued after MULTI Annotated return value: simple-string

Definition at line 3768 of file nwnx_redis_short.nss.

◆ DUMP()

int DUMP ( string  key)

DUMP

Return a serialized version of the value stored at the specified key.

Time complexity: O(1) to access the key and additional O(N*M) to serialized it, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). Annotated return value: bulk-string

Definition at line 3774 of file nwnx_redis_short.nss.

◆ ECHO()

int ECHO ( string  message)

ECHO

Echo the given string Annotated return value: bulk-string

Definition at line 3783 of file nwnx_redis_short.nss.

◆ EVAL()

int EVAL ( string  script,
int  numkeys,
string  key,
string  arg 
)

EVAL

Execute a Lua script server side

Time complexity: Depends on the script that is executed. Annotated return value:

Definition at line 3792 of file nwnx_redis_short.nss.

◆ EVALSHA()

int EVALSHA ( string  sha1,
int  numkeys,
string  key,
string  arg 
)

EVALSHA

Execute a Lua script server side

Time complexity: Depends on the script that is executed. Annotated return value:

Definition at line 3808 of file nwnx_redis_short.nss.

◆ EXEC()

int EXEC ( )

EXEC

Execute all commands issued after MULTI Annotated return value: array

Definition at line 3824 of file nwnx_redis_short.nss.

◆ EXISTS()

int EXISTS ( string  key)

EXISTS

Determine if a key exists

Time complexity: O(1) Annotated return value: integer

Definition at line 3830 of file nwnx_redis_short.nss.

◆ EXPIRE()

int EXPIRE ( string  key,
int  seconds 
)

EXPIRE

Set a key's time to live in seconds

Time complexity: O(1) Annotated return value: integer

Definition at line 3839 of file nwnx_redis_short.nss.

◆ EXPIREAT()

int EXPIREAT ( string  key,
string  timestamp 
)

EXPIREAT

Set the expiration for a key as a UNIX timestamp

Time complexity: O(1) Annotated return value: integer

Definition at line 3851 of file nwnx_redis_short.nss.

◆ FLUSHALL()

int FLUSHALL ( string  async = "")

FLUSHALL

Remove all keys from all databases

  • Valid values for async: "ASYNC" Annotated return value: simple-string

Definition at line 3863 of file nwnx_redis_short.nss.

◆ FLUSHDB()

int FLUSHDB ( string  async = "")

FLUSHDB

Remove all keys from the current database

  • Valid values for async: "ASYNC" Annotated return value: simple-string

Definition at line 3873 of file nwnx_redis_short.nss.

◆ GEOADD()

int GEOADD ( string  key,
float  longitude,
float  latitude,
string  member 
)

GEOADD

Add one or more geospatial items in the geospatial index represented using a sorted set

Time complexity: O(log(N)) for each item added, where N is the number of elements in the sorted set. Annotated return value: integer

Definition at line 3883 of file nwnx_redis_short.nss.

◆ GEOHASH()

int GEOHASH ( string  key,
string  member 
)

GEOHASH

Returns members of a geospatial index as standard geohash strings

Time complexity: O(log(N)) for each member requested, where N is the number of elements in the sorted set. Annotated return value: array

Definition at line 3900 of file nwnx_redis_short.nss.

◆ GEOPOS()

int GEOPOS ( string  key,
string  member 
)

GEOPOS

Returns longitude and latitude of members of a geospatial index

Time complexity: O(log(N)) for each member requested, where N is the number of elements in the sorted set. Annotated return value: array

Definition at line 3911 of file nwnx_redis_short.nss.

◆ GEODIST()

int GEODIST ( string  key,
string  member1,
string  member2,
string  unit = "" 
)

GEODIST

Returns the distance between two members of a geospatial index

Time complexity: O(log(N)) Annotated return value: bulk-string

Definition at line 3922 of file nwnx_redis_short.nss.

◆ GEORADIUS()

int GEORADIUS ( string  key,
float  longitude,
float  latitude,
float  radius,
string  unit,
string  withcoord = "",
string  withdist = "",
string  withhash = "",
int  count_count = 0,
string  order = "",
string  store_key = "",
string  storedist_key = "" 
)

GEORADIUS

Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point

Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

  • Valid values for unit: "m", "km", "ft", "mi"
  • Valid values for withcoord: "WITHCOORD"
  • Valid values for withdist: "WITHDIST"
  • Valid values for withhash: "WITHHASH"
  • Valid values for order: "ASC", "DESC" Annotated return value: array

Definition at line 3937 of file nwnx_redis_short.nss.

◆ GEORADIUSBYMEMBER()

int GEORADIUSBYMEMBER ( string  key,
string  member,
float  radius,
string  unit,
string  withcoord = "",
string  withdist = "",
string  withhash = "",
int  count_count = 0,
string  order = "",
string  store_key = "",
string  storedist_key = "" 
)

GEORADIUSBYMEMBER

Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member

Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.

  • Valid values for unit: "m", "km", "ft", "mi"
  • Valid values for withcoord: "WITHCOORD"
  • Valid values for withdist: "WITHDIST"
  • Valid values for withhash: "WITHHASH"
  • Valid values for order: "ASC", "DESC" Annotated return value:

Definition at line 3979 of file nwnx_redis_short.nss.

◆ GET()

int GET ( string  key)

GET

Get the value of a key

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4017 of file nwnx_redis_short.nss.

◆ GETBIT()

int GETBIT ( string  key,
int  offset 
)

GETBIT

Returns the bit value at offset in the string value stored at key

Time complexity: O(1) Annotated return value: integer

Definition at line 4026 of file nwnx_redis_short.nss.

◆ GETRANGE()

int GETRANGE ( string  key,
int  start,
int  end 
)

GETRANGE

Get a substring of the string stored at a key

Time complexity: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings. Annotated return value: bulk-string

Definition at line 4038 of file nwnx_redis_short.nss.

◆ GETSET()

int GETSET ( string  key,
string  value 
)

GETSET

Set the string value of a key and return its old value

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4053 of file nwnx_redis_short.nss.

◆ HDEL()

int HDEL ( string  key,
string  field 
)

HDEL

Delete one or more hash fields

Time complexity: O(N) where N is the number of fields to be removed. Annotated return value: integer

Definition at line 4064 of file nwnx_redis_short.nss.

◆ HEXISTS()

int HEXISTS ( string  key,
string  field 
)

HEXISTS

Determine if a hash field exists

Time complexity: O(1) Annotated return value: integer

Definition at line 4075 of file nwnx_redis_short.nss.

◆ HGET()

int HGET ( string  key,
string  field 
)

HGET

Get the value of a hash field

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4086 of file nwnx_redis_short.nss.

◆ HGETALL()

int HGETALL ( string  key)

HGETALL

Get all the fields and values in a hash

Time complexity: O(N) where N is the size of the hash. Annotated return value: array

Definition at line 4097 of file nwnx_redis_short.nss.

◆ HINCRBY()

int HINCRBY ( string  key,
string  field,
int  increment 
)

HINCRBY

Increment the integer value of a hash field by the given number

Time complexity: O(1) Annotated return value: integer

Definition at line 4106 of file nwnx_redis_short.nss.

◆ HINCRBYFLOAT()

int HINCRBYFLOAT ( string  key,
string  field,
float  increment 
)

HINCRBYFLOAT

Increment the float value of a hash field by the given amount

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4120 of file nwnx_redis_short.nss.

◆ HKEYS()

int HKEYS ( string  key)

HKEYS

Get all the fields in a hash

Time complexity: O(N) where N is the size of the hash. Annotated return value: array

Definition at line 4134 of file nwnx_redis_short.nss.

◆ HLEN()

int HLEN ( string  key)

HLEN

Get the number of fields in a hash

Time complexity: O(1) Annotated return value: integer

Definition at line 4143 of file nwnx_redis_short.nss.

◆ HMGET()

int HMGET ( string  key,
string  field 
)

HMGET

Get the values of all the given hash fields

Time complexity: O(N) where N is the number of fields being requested. Annotated return value: array

Definition at line 4152 of file nwnx_redis_short.nss.

◆ HMSET()

int HMSET ( string  key,
string  field,
string  value 
)

HMSET

Set multiple hash fields to multiple values

Time complexity: O(N) where N is the number of fields being set. Annotated return value: simple-string

Definition at line 4163 of file nwnx_redis_short.nss.

◆ HSET()

int HSET ( string  key,
string  field,
string  value 
)

HSET

Set the string value of a hash field

Time complexity: O(1) Annotated return value: integer

Definition at line 4176 of file nwnx_redis_short.nss.

◆ HSETNX()

int HSETNX ( string  key,
string  field,
string  value 
)

HSETNX

Set the value of a hash field, only if the field does not exist

Time complexity: O(1) Annotated return value: integer

Definition at line 4189 of file nwnx_redis_short.nss.

◆ HSTRLEN()

int HSTRLEN ( string  key,
string  field 
)

HSTRLEN

Get the length of the value of a hash field

Time complexity: O(1) Annotated return value: integer

Definition at line 4202 of file nwnx_redis_short.nss.

◆ HVALS()

int HVALS ( string  key)

HVALS

Get all the values in a hash

Time complexity: O(N) where N is the size of the hash. Annotated return value: array

Definition at line 4213 of file nwnx_redis_short.nss.

◆ INCR()

int INCR ( string  key)

INCR

Increment the integer value of a key by one

Time complexity: O(1) Annotated return value: integer

Definition at line 4222 of file nwnx_redis_short.nss.

◆ INCRBY()

int INCRBY ( string  key,
int  increment 
)

INCRBY

Increment the integer value of a key by the given amount

Time complexity: O(1) Annotated return value: integer

Definition at line 4231 of file nwnx_redis_short.nss.

◆ INCRBYFLOAT()

int INCRBYFLOAT ( string  key,
float  increment 
)

INCRBYFLOAT

Increment the float value of a key by the given amount

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4243 of file nwnx_redis_short.nss.

◆ INFO()

int INFO ( string  section = "")

INFO

Get information and statistics about the server Annotated return value: bulk-string

Definition at line 4255 of file nwnx_redis_short.nss.

◆ KEYS()

int KEYS ( string  pattern)

KEYS

Find all keys matching the given pattern

Time complexity: O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length. Annotated return value: array

Definition at line 4264 of file nwnx_redis_short.nss.

◆ LASTSAVE()

int LASTSAVE ( )

LASTSAVE

Get the UNIX time stamp of the last successful save to disk Annotated return value: integer

Definition at line 4273 of file nwnx_redis_short.nss.

◆ LINDEX()

int LINDEX ( string  key,
int  index 
)

LINDEX

Get an element from a list by its index

Time complexity: O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1). Annotated return value: bulk-string

Definition at line 4279 of file nwnx_redis_short.nss.

◆ LINSERT()

int LINSERT ( string  key,
string  where,
string  pivot,
string  value 
)

LINSERT

Insert an element before or after another element in a list

Time complexity: O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).

  • Valid values for where: "BEFORE", "AFTER" Annotated return value: integer

Definition at line 4291 of file nwnx_redis_short.nss.

◆ LLEN()

int LLEN ( string  key)

LLEN

Get the length of a list

Time complexity: O(1) Annotated return value: integer

Definition at line 4307 of file nwnx_redis_short.nss.

◆ LPOP()

int LPOP ( string  key)

LPOP

Remove and get the first element in a list

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4316 of file nwnx_redis_short.nss.

◆ LPUSH()

int LPUSH ( string  key,
string  value 
)

LPUSH

Prepend one or multiple values to a list

Time complexity: O(1) Annotated return value: integer

Definition at line 4325 of file nwnx_redis_short.nss.

◆ LPUSHX()

int LPUSHX ( string  key,
string  value 
)

LPUSHX

Prepend a value to a list, only if the list exists

Time complexity: O(1) Annotated return value: integer

Definition at line 4336 of file nwnx_redis_short.nss.

◆ LRANGE()

int LRANGE ( string  key,
int  start,
int  stop 
)

LRANGE

Get a range of elements from a list

Time complexity: O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range. Annotated return value: array

Definition at line 4347 of file nwnx_redis_short.nss.

◆ LREM()

int LREM ( string  key,
int  count,
string  value 
)

LREM

Remove elements from a list

Time complexity: O(N) where N is the length of the list. Annotated return value: integer

Definition at line 4362 of file nwnx_redis_short.nss.

◆ LSET()

int LSET ( string  key,
int  index,
string  value 
)

LSET

Set the value of an element in a list by its index

Time complexity: O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1). Annotated return value: simple-string

Definition at line 4376 of file nwnx_redis_short.nss.

◆ LTRIM()

int LTRIM ( string  key,
int  start,
int  stop 
)

LTRIM

Trim a list to the specified range

Time complexity: O(N) where N is the number of elements to be removed by the operation. Annotated return value: simple-string

Definition at line 4390 of file nwnx_redis_short.nss.

◆ MEMORY_DOCTOR()

int MEMORY_DOCTOR ( )

MEMORY_DOCTOR

Outputs memory problems report Annotated return value: bulk-string

Definition at line 4405 of file nwnx_redis_short.nss.

◆ MEMORY_HELP()

int MEMORY_HELP ( )

MEMORY_HELP

Show helpful text about the different subcommands Annotated return value: array

Definition at line 4411 of file nwnx_redis_short.nss.

◆ MEMORY_MALLOC_STATS()

int MEMORY_MALLOC_STATS ( )

MEMORY_MALLOC_STATS

Show allocator internal stats Annotated return value: bulk-string

Definition at line 4417 of file nwnx_redis_short.nss.

◆ MEMORY_PURGE()

int MEMORY_PURGE ( )

MEMORY_PURGE

Ask the allocator to release memory Annotated return value: simple-string

Definition at line 4423 of file nwnx_redis_short.nss.

◆ MEMORY_STATS()

int MEMORY_STATS ( )

MEMORY_STATS

Show memory usage details Annotated return value: array

Definition at line 4429 of file nwnx_redis_short.nss.

◆ MEMORY_USAGE()

int MEMORY_USAGE ( string  key,
int  samples_count = 0 
)

MEMORY_USAGE

Estimate the memory usage of a key

Time complexity: O(N) where N is the number of samples. Annotated return value: integer

Definition at line 4435 of file nwnx_redis_short.nss.

◆ MGET()

int MGET ( string  key)

MGET

Get the values of all the given keys

Time complexity: O(N) where N is the number of keys to retrieve. Annotated return value: array

Definition at line 4447 of file nwnx_redis_short.nss.

◆ MIGRATE()

int MIGRATE ( string  host,
string  port,
string  key,
int  destination_db,
int  timeout,
string  copy = "",
string  replace = "",
string  auth_password = "",
string  keys_key = "" 
)

MIGRATE

Atomically transfer a key from a Redis instance to another one.

Time complexity: This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.

  • Valid values for key: "key", "\"""
  • Valid values for copy: "COPY"
  • Valid values for replace: "REPLACE" Annotated return value: simple-string

Definition at line 4456 of file nwnx_redis_short.nss.

◆ MONITOR()

int MONITOR ( )

MONITOR

Listen for all requests received by the server in real time Annotated return value:

Definition at line 4487 of file nwnx_redis_short.nss.

◆ MOVE()

int MOVE ( string  key,
int  db 
)

MOVE

Move a key to another database

Time complexity: O(1) Annotated return value: integer

Definition at line 4493 of file nwnx_redis_short.nss.

◆ MSET()

int MSET ( string  key,
string  value 
)

MSET

Set multiple keys to multiple values

Time complexity: O(N) where N is the number of keys to set. Annotated return value: simple-string

Definition at line 4505 of file nwnx_redis_short.nss.

◆ MSETNX()

int MSETNX ( string  key,
string  value 
)

MSETNX

Set multiple keys to multiple values, only if none of the keys exist

Time complexity: O(N) where N is the number of keys to set. Annotated return value: integer

Definition at line 4516 of file nwnx_redis_short.nss.

◆ MULTI()

int MULTI ( )

MULTI

Mark the start of a transaction block Annotated return value: simple-string

Definition at line 4527 of file nwnx_redis_short.nss.

◆ OBJECT()

int OBJECT ( string  subcommand,
string  arguments = "" 
)

OBJECT

Inspect the internals of Redis objects

Time complexity: O(1) for all the currently implemented subcommands. Annotated return value:

Definition at line 4533 of file nwnx_redis_short.nss.

◆ PERSIST()

int PERSIST ( string  key)

PERSIST

Remove the expiration from a key

Time complexity: O(1) Annotated return value: integer

Definition at line 4544 of file nwnx_redis_short.nss.

◆ PEXPIRE()

int PEXPIRE ( string  key,
int  milliseconds 
)

PEXPIRE

Set a key's time to live in milliseconds

Time complexity: O(1) Annotated return value: integer

Definition at line 4553 of file nwnx_redis_short.nss.

◆ PEXPIREAT()

int PEXPIREAT ( string  key,
string  milliseconds_timestamp 
)

PEXPIREAT

Set the expiration for a key as a UNIX timestamp specified in milliseconds

Time complexity: O(1) Annotated return value: integer

Definition at line 4565 of file nwnx_redis_short.nss.

◆ PFADD()

int PFADD ( string  key,
string  element 
)

PFADD

Adds the specified elements to the specified HyperLogLog.

Time complexity: O(1) to add every element. Annotated return value: integer

Definition at line 4577 of file nwnx_redis_short.nss.

◆ PFCOUNT()

int PFCOUNT ( string  key)

PFCOUNT

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

Time complexity: O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys. Annotated return value: integer

Definition at line 4588 of file nwnx_redis_short.nss.

◆ PFMERGE()

int PFMERGE ( string  destkey,
string  sourcekey 
)

PFMERGE

Merge N different HyperLogLogs into a single one.

Time complexity: O(N) to merge N HyperLogLogs, but with high constant times. Annotated return value: simple-string

Definition at line 4597 of file nwnx_redis_short.nss.

◆ PING()

int PING ( string  message = "")

PING

Ping the server Annotated return value: simple-string

Definition at line 4610 of file nwnx_redis_short.nss.

◆ PSETEX()

int PSETEX ( string  key,
int  milliseconds,
string  value 
)

PSETEX

Set the value and expiration in milliseconds of a key

Time complexity: O(1) Annotated return value:

Definition at line 4619 of file nwnx_redis_short.nss.

◆ PUBSUB()

int PUBSUB ( string  subcommand,
string  argument = "" 
)

PUBSUB

Inspect the state of the Pub/Sub subsystem

Time complexity: O(N) for the CHANNELS subcommand, where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns). O(N) for the NUMSUB subcommand, where N is the number of requested channels. O(1) for the NUMPAT subcommand. Annotated return value: array

Definition at line 4633 of file nwnx_redis_short.nss.

◆ PTTL()

int PTTL ( string  key)

PTTL

Get the time to live for a key in milliseconds

Time complexity: O(1) Annotated return value: integer

Definition at line 4644 of file nwnx_redis_short.nss.

◆ PUBLISH()

int PUBLISH ( string  channel,
string  message 
)

PUBLISH

Post a message to a channel

Time complexity: O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client). Annotated return value: integer

Definition at line 4653 of file nwnx_redis_short.nss.

◆ QUIT()

int QUIT ( )

QUIT

Close the connection Annotated return value: simple-string

Definition at line 4664 of file nwnx_redis_short.nss.

◆ RANDOMKEY()

int RANDOMKEY ( )

RANDOMKEY

Return a random key from the keyspace

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4670 of file nwnx_redis_short.nss.

◆ READONLY()

int READONLY ( )

READONLY

Enables read queries for a connection to a cluster replica node

Time complexity: O(1) Annotated return value: simple-string

Definition at line 4676 of file nwnx_redis_short.nss.

◆ READWRITE()

int READWRITE ( )

READWRITE

Disables read queries for a connection to a cluster replica node

Time complexity: O(1) Annotated return value: simple-string

Definition at line 4682 of file nwnx_redis_short.nss.

◆ RENAME()

int RENAME ( string  key,
string  newkey 
)

RENAME

Rename a key

Time complexity: O(1) Annotated return value: simple-string

Definition at line 4688 of file nwnx_redis_short.nss.

◆ RENAMENX()

int RENAMENX ( string  key,
string  newkey 
)

RENAMENX

Rename a key, only if the new key does not exist

Time complexity: O(1) Annotated return value: integer

Definition at line 4700 of file nwnx_redis_short.nss.

◆ RESTORE()

int RESTORE ( string  key,
int  ttl,
string  serialized_value,
string  replace = "",
string  absttl = "",
int  idletime_seconds = 0,
int  freq_frequency = 0 
)

RESTORE

Create a key using the provided serialized value, previously obtained using DUMP.

Time complexity: O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).

  • Valid values for replace: "REPLACE"
  • Valid values for absttl: "ABSTTL" Annotated return value: simple-string

Definition at line 4712 of file nwnx_redis_short.nss.

◆ ROLE()

int ROLE ( )

ROLE

Return the role of the instance in the context of replication Annotated return value: array

Definition at line 4738 of file nwnx_redis_short.nss.

◆ RPOP()

int RPOP ( string  key)

RPOP

Remove and get the last element in a list

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4744 of file nwnx_redis_short.nss.

◆ RPOPLPUSH()

int RPOPLPUSH ( string  source,
string  destination 
)

RPOPLPUSH

Remove the last element in a list, prepend it to another list and return it

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 4753 of file nwnx_redis_short.nss.

◆ RPUSH()

int RPUSH ( string  key,
string  value 
)

RPUSH

Append one or multiple values to a list

Time complexity: O(1) Annotated return value: integer

Definition at line 4766 of file nwnx_redis_short.nss.

◆ RPUSHX()

int RPUSHX ( string  key,
string  value 
)

RPUSHX

Append a value to a list, only if the list exists

Time complexity: O(1) Annotated return value: integer

Definition at line 4777 of file nwnx_redis_short.nss.

◆ SADD()

int SADD ( string  key,
string  member 
)

SADD

Add one or more members to a set

Time complexity: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. Annotated return value: integer

Definition at line 4788 of file nwnx_redis_short.nss.

◆ SAVE()

int SAVE ( )

SAVE

Synchronously save the dataset to disk Annotated return value: simple-string

Definition at line 4799 of file nwnx_redis_short.nss.

◆ SCARD()

int SCARD ( string  key)

SCARD

Get the number of members in a set

Time complexity: O(1) Annotated return value: integer

Definition at line 4805 of file nwnx_redis_short.nss.

◆ SCRIPT_DEBUG()

int SCRIPT_DEBUG ( string  mode)

SCRIPT_DEBUG

Set the debug mode for executed scripts.

Time complexity: O(1)

  • Valid values for mode: "YES", "SYNC", "NO" Annotated return value: simple-string

Definition at line 4814 of file nwnx_redis_short.nss.

◆ SCRIPT_EXISTS()

int SCRIPT_EXISTS ( string  sha1)

SCRIPT_EXISTS

Check existence of scripts in the script cache.

Time complexity: O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation). Annotated return value: array

Definition at line 4824 of file nwnx_redis_short.nss.

◆ SCRIPT_FLUSH()

int SCRIPT_FLUSH ( )

SCRIPT_FLUSH

Remove all the scripts from the script cache.

Time complexity: O(N) with N being the number of scripts in cache Annotated return value: simple-string

Definition at line 4833 of file nwnx_redis_short.nss.

◆ SCRIPT_KILL()

int SCRIPT_KILL ( )

SCRIPT_KILL

Kill the script currently in execution.

Time complexity: O(1) Annotated return value: simple-string

Definition at line 4839 of file nwnx_redis_short.nss.

◆ SCRIPT_LOAD()

int SCRIPT_LOAD ( string  script)

SCRIPT_LOAD

Load the specified Lua script into the script cache.

Time complexity: O(N) with N being the length in bytes of the script body. Annotated return value: bulk-string

Definition at line 4845 of file nwnx_redis_short.nss.

◆ SDIFF()

int SDIFF ( string  key)

SDIFF

Subtract multiple sets

Time complexity: O(N) where N is the total number of elements in all given sets. Annotated return value: array

Definition at line 4854 of file nwnx_redis_short.nss.

◆ SDIFFSTORE()

int SDIFFSTORE ( string  destination,
string  key 
)

SDIFFSTORE

Subtract multiple sets and store the resulting set in a key

Time complexity: O(N) where N is the total number of elements in all given sets. Annotated return value: integer

Definition at line 4863 of file nwnx_redis_short.nss.

◆ SELECT()

int SELECT ( int  index)

SELECT

Change the selected database for the current connection Annotated return value: simple-string

Definition at line 4875 of file nwnx_redis_short.nss.

◆ SET()

int SET ( string  key,
string  value,
string  condition = "" 
)

SET

Set the string value of a key

Time complexity: O(1)

  • Valid values for condition: "NX", "XX" Annotated return value: simple-string

Definition at line 4885 of file nwnx_redis_short.nss.

◆ SETBIT()

int SETBIT ( string  key,
int  offset,
string  value 
)

SETBIT

Sets or clears the bit at offset in the string value stored at key

Time complexity: O(1) Annotated return value: integer

Definition at line 4899 of file nwnx_redis_short.nss.

◆ SETEX()

int SETEX ( string  key,
int  seconds,
string  value 
)

SETEX

Set the value and expiration of a key

Time complexity: O(1) Annotated return value: simple-string

Definition at line 4913 of file nwnx_redis_short.nss.

◆ SETNX()

int SETNX ( string  key,
string  value 
)

SETNX

Set the value of a key, only if the key does not exist

Time complexity: O(1) Annotated return value: integer

Definition at line 4927 of file nwnx_redis_short.nss.

◆ SETRANGE()

int SETRANGE ( string  key,
int  offset,
string  value 
)

SETRANGE

Overwrite part of a string at key starting at the specified offset

Time complexity: O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument. Annotated return value: integer

Definition at line 4938 of file nwnx_redis_short.nss.

◆ SHUTDOWN()

int SHUTDOWN ( string  save_mode = "")

SHUTDOWN

Synchronously save the dataset to disk and then shut down the server

  • Valid values for save_mode: "NOSAVE", "SAVE" Annotated return value: simple-string

Definition at line 4952 of file nwnx_redis_short.nss.

◆ SINTER()

int SINTER ( string  key)

SINTER

Intersect multiple sets

Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets. Annotated return value: array

Definition at line 4962 of file nwnx_redis_short.nss.

◆ SINTERSTORE()

int SINTERSTORE ( string  destination,
string  key 
)

SINTERSTORE

Intersect multiple sets and store the resulting set in a key

Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets. Annotated return value: integer

Definition at line 4971 of file nwnx_redis_short.nss.

◆ SISMEMBER()

int SISMEMBER ( string  key,
string  member 
)

SISMEMBER

Determine if a given value is a member of a set

Time complexity: O(1) Annotated return value: integer

Definition at line 4983 of file nwnx_redis_short.nss.

◆ SLAVEOF()

int SLAVEOF ( string  host,
string  port 
)

SLAVEOF

Make the server a replica of another instance, or promote it as master. Deprecated starting with Redis 5. Use REPLICAOF instead. Annotated return value: simple-string

Definition at line 4994 of file nwnx_redis_short.nss.

◆ REPLICAOF()

int REPLICAOF ( string  host,
string  port 
)

REPLICAOF

Make the server a replica of another instance, or promote it as master. Annotated return value: simple-string

Definition at line 5005 of file nwnx_redis_short.nss.

◆ SLOWLOG()

int SLOWLOG ( string  subcommand,
string  argument = "" 
)

SLOWLOG

Manages the Redis slow queries log Annotated return value:

Definition at line 5016 of file nwnx_redis_short.nss.

◆ SMEMBERS()

int SMEMBERS ( string  key)

SMEMBERS

Get all the members in a set

Time complexity: O(N) where N is the set cardinality. Annotated return value: array

Definition at line 5027 of file nwnx_redis_short.nss.

◆ SMOVE()

int SMOVE ( string  source,
string  destination,
string  member 
)

SMOVE

Move a member from one set to another

Time complexity: O(1) Annotated return value: integer

Definition at line 5036 of file nwnx_redis_short.nss.

◆ SORT()

int SORT ( string  key,
string  by_pattern = "",
int  limit_offset = 0,
int  limit_count = 0,
string  get_pattern = "",
string  order = "",
string  sorting = "",
string  store_destination = "" 
)

SORT

Sort the elements in a list, set or sorted set

Time complexity: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is currently O(N) as there is a copy step that will be avoided in next releases.

  • Valid values for order: "ASC", "DESC"
  • Valid values for sorting: "ALPHA" Annotated return value: array

Definition at line 5051 of file nwnx_redis_short.nss.

◆ SPOP()

int SPOP ( string  key,
int  count = 0 
)

SPOP

Remove and return one or multiple random members from a set

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 5080 of file nwnx_redis_short.nss.

◆ SRANDMEMBER()

int SRANDMEMBER ( string  key,
int  count = 0 
)

SRANDMEMBER

Get one or multiple random members from a set

Time complexity: Without the count argument O(1), otherwise O(N) where N is the absolute value of the passed count. Annotated return value: bulk-string

Definition at line 5092 of file nwnx_redis_short.nss.

◆ SREM()

int SREM ( string  key,
string  member 
)

SREM

Remove one or more members from a set

Time complexity: O(N) where N is the number of members to be removed. Annotated return value: integer

Definition at line 5104 of file nwnx_redis_short.nss.

◆ STRLEN()

int STRLEN ( string  key)

STRLEN

Get the length of the value stored in a key

Time complexity: O(1) Annotated return value: integer

Definition at line 5115 of file nwnx_redis_short.nss.

◆ SUNION()

int SUNION ( string  key)

SUNION

Add multiple sets

Time complexity: O(N) where N is the total number of elements in all given sets. Annotated return value: array

Definition at line 5124 of file nwnx_redis_short.nss.

◆ SUNIONSTORE()

int SUNIONSTORE ( string  destination,
string  key 
)

SUNIONSTORE

Add multiple sets and store the resulting set in a key

Time complexity: O(N) where N is the total number of elements in all given sets. Annotated return value: integer

Definition at line 5133 of file nwnx_redis_short.nss.

◆ SWAPDB()

int SWAPDB ( int  index,
int  index_1 
)

SWAPDB

Swaps two Redis databases Annotated return value: simple-string

Definition at line 5145 of file nwnx_redis_short.nss.

◆ SYNC()

int SYNC ( )

SYNC

Internal command used for replication Annotated return value:

Definition at line 5158 of file nwnx_redis_short.nss.

◆ TIME()

int TIME ( )

TIME

Return the current server time

Time complexity: O(1) Annotated return value: array

Definition at line 5164 of file nwnx_redis_short.nss.

◆ TOUCH()

int TOUCH ( string  key)

TOUCH

Alters the last access time of a key(s). Returns the number of existing keys specified.

Time complexity: O(N) where N is the number of keys that will be touched. Annotated return value: integer

Definition at line 5170 of file nwnx_redis_short.nss.

◆ TTL()

int TTL ( string  key)

TTL

Get the time to live for a key

Time complexity: O(1) Annotated return value: integer

Definition at line 5179 of file nwnx_redis_short.nss.

◆ TYPE()

int TYPE ( string  key)

TYPE

Determine the type stored at key

Time complexity: O(1) Annotated return value: simple-string

Definition at line 5188 of file nwnx_redis_short.nss.

◆ UNLINK()

int UNLINK ( string  key)

UNLINK

Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.

Time complexity: O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of. Annotated return value: integer

Definition at line 5197 of file nwnx_redis_short.nss.

◆ UNWATCH()

int UNWATCH ( )

UNWATCH

Forget about all watched keys

Time complexity: O(1) Annotated return value: simple-string

Definition at line 5206 of file nwnx_redis_short.nss.

◆ WAIT()

int WAIT ( int  numreplicas,
int  timeout 
)

WAIT

Wait for the synchronous replication of all the write commands sent in the context of the current connection

Time complexity: O(1) Annotated return value: integer

Definition at line 5212 of file nwnx_redis_short.nss.

◆ WATCH()

int WATCH ( string  key)

WATCH

Watch the given keys to determine execution of the MULTI/EXEC block

Time complexity: O(1) for every key. Annotated return value: simple-string

Definition at line 5225 of file nwnx_redis_short.nss.

◆ ZADD()

int ZADD ( string  key,
string  condition = "",
string  change = "",
string  increment = "",
float  score = 0.0,
string  member = "" 
)

ZADD

Add one or more members to a sorted set, or update its score if it already exists

Time complexity: O(log(N)) for each item added, where N is the number of elements in the sorted set.

  • Valid values for condition: "NX", "XX"
  • Valid values for change: "CH"
  • Valid values for increment: "INCR" Annotated return value: integer

Definition at line 5234 of file nwnx_redis_short.nss.

◆ ZCARD()

int ZCARD ( string  key)

ZCARD

Get the number of members in a sorted set

Time complexity: O(1) Annotated return value: integer

Definition at line 5257 of file nwnx_redis_short.nss.

◆ ZCOUNT()

int ZCOUNT ( string  key,
float  min,
float  max 
)

ZCOUNT

Count the members in a sorted set with scores within the given values

Time complexity: O(log(N)) with N being the number of elements in the sorted set. Annotated return value: integer

Definition at line 5266 of file nwnx_redis_short.nss.

◆ ZINCRBY()

int ZINCRBY ( string  key,
int  increment,
string  member 
)

ZINCRBY

Increment the score of a member in a sorted set

Time complexity: O(log(N)) where N is the number of elements in the sorted set. Annotated return value: bulk-string

Definition at line 5281 of file nwnx_redis_short.nss.

◆ ZINTERSTORE()

int ZINTERSTORE ( string  destination,
int  numkeys,
string  key,
int  weights_weight = 0,
string  aggregate_aggregate = "" 
)

ZINTERSTORE

Intersect multiple sorted sets and store the resulting sorted set in a new key

Time complexity: O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.

  • Valid values for aggregate_aggregate: "SUM", "MIN", "MAX" Annotated return value: integer

Definition at line 5295 of file nwnx_redis_short.nss.

◆ ZLEXCOUNT()

int ZLEXCOUNT ( string  key,
string  min,
string  max 
)

ZLEXCOUNT

Count the number of members in a sorted set between a given lexicographical range

Time complexity: O(log(N)) with N being the number of elements in the sorted set. Annotated return value: integer

Definition at line 5316 of file nwnx_redis_short.nss.

◆ ZPOPMAX()

int ZPOPMAX ( string  key,
int  count = 0 
)

ZPOPMAX

Remove and return members with the highest scores in a sorted set

Time complexity: O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped. Annotated return value: array

Definition at line 5329 of file nwnx_redis_short.nss.

◆ ZPOPMIN()

int ZPOPMIN ( string  key,
int  count = 0 
)

ZPOPMIN

Remove and return members with the lowest scores in a sorted set

Time complexity: O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped. Annotated return value: array

Definition at line 5341 of file nwnx_redis_short.nss.

◆ ZRANGE()

int ZRANGE ( string  key,
int  start,
int  stop,
string  withscores = "" 
)

ZRANGE

Return a range of members in a sorted set, by index

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.

  • Valid values for withscores: "WITHSCORES" Annotated return value: array

Definition at line 5353 of file nwnx_redis_short.nss.

◆ ZRANGEBYLEX()

int ZRANGEBYLEX ( string  key,
string  min,
string  max,
int  limit_offset = 0,
int  limit_count = 0 
)

ZRANGEBYLEX

Return a range of members in a sorted set, by lexicographical range

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). Annotated return value: array

Definition at line 5371 of file nwnx_redis_short.nss.

◆ ZREVRANGEBYLEX()

int ZREVRANGEBYLEX ( string  key,
string  max,
string  min,
int  limit_offset = 0,
int  limit_count = 0 
)

ZREVRANGEBYLEX

Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). Annotated return value: array

Definition at line 5390 of file nwnx_redis_short.nss.

◆ ZRANGEBYSCORE()

int ZRANGEBYSCORE ( string  key,
float  min,
float  max,
string  withscores = "",
int  limit_offset = 0,
int  limit_count = 0 
)

ZRANGEBYSCORE

Return a range of members in a sorted set, by score

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).

  • Valid values for withscores: "WITHSCORES" Annotated return value: array

Definition at line 5409 of file nwnx_redis_short.nss.

◆ ZRANK()

int ZRANK ( string  key,
string  member 
)

ZRANK

Determine the index of a member in a sorted set

Time complexity: O(log(N)) Annotated return value: integer

Definition at line 5433 of file nwnx_redis_short.nss.

◆ ZREM()

int ZREM ( string  key,
string  member 
)

ZREM

Remove one or more members from a sorted set

Time complexity: O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed. Annotated return value: integer

Definition at line 5444 of file nwnx_redis_short.nss.

◆ ZREMRANGEBYLEX()

int ZREMRANGEBYLEX ( string  key,
string  min,
string  max 
)

ZREMRANGEBYLEX

Remove all members in a sorted set between the given lexicographical range

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation. Annotated return value: integer

Definition at line 5455 of file nwnx_redis_short.nss.

◆ ZREMRANGEBYRANK()

int ZREMRANGEBYRANK ( string  key,
int  start,
int  stop 
)

ZREMRANGEBYRANK

Remove all members in a sorted set within the given indexes

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation. Annotated return value: integer

Definition at line 5468 of file nwnx_redis_short.nss.

◆ ZREMRANGEBYSCORE()

int ZREMRANGEBYSCORE ( string  key,
float  min,
float  max 
)

ZREMRANGEBYSCORE

Remove all members in a sorted set within the given scores

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation. Annotated return value: integer

Definition at line 5483 of file nwnx_redis_short.nss.

◆ ZREVRANGE()

int ZREVRANGE ( string  key,
int  start,
int  stop,
string  withscores = "" 
)

ZREVRANGE

Return a range of members in a sorted set, by index, with scores ordered from high to low

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.

  • Valid values for withscores: "WITHSCORES" Annotated return value: array

Definition at line 5498 of file nwnx_redis_short.nss.

◆ ZREVRANGEBYSCORE()

int ZREVRANGEBYSCORE ( string  key,
float  max,
float  min,
string  withscores = "",
int  limit_offset = 0,
int  limit_count = 0 
)

ZREVRANGEBYSCORE

Return a range of members in a sorted set, by score, with scores ordered from high to low

Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).

  • Valid values for withscores: "WITHSCORES" Annotated return value: array

Definition at line 5516 of file nwnx_redis_short.nss.

◆ ZREVRANK()

int ZREVRANK ( string  key,
string  member 
)

ZREVRANK

Determine the index of a member in a sorted set, with scores ordered from high to low

Time complexity: O(log(N)) Annotated return value: integer

Definition at line 5540 of file nwnx_redis_short.nss.

◆ ZSCORE()

int ZSCORE ( string  key,
string  member 
)

ZSCORE

Get the score associated with the given member in a sorted set

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 5551 of file nwnx_redis_short.nss.

◆ ZUNIONSTORE()

int ZUNIONSTORE ( string  destination,
int  numkeys,
string  key,
int  weights_weight = 0,
string  aggregate_aggregate = "" 
)

ZUNIONSTORE

Add multiple sorted sets and store the resulting sorted set in a new key

Time complexity: O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.

  • Valid values for aggregate_aggregate: "SUM", "MIN", "MAX" Annotated return value: integer

Definition at line 5562 of file nwnx_redis_short.nss.

◆ SCAN()

int SCAN ( int  cursor,
string  match_pattern = "",
int  count_count = 0,
string  type_type = "" 
)

SCAN

Incrementally iterate the keys space

Time complexity: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection. Annotated return value:

Definition at line 5583 of file nwnx_redis_short.nss.

◆ SSCAN()

int SSCAN ( string  key,
int  cursor,
string  match_pattern = "",
int  count_count = 0 
)

SSCAN

Incrementally iterate Set elements

Time complexity: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.. Annotated return value:

Definition at line 5601 of file nwnx_redis_short.nss.

◆ HSCAN()

int HSCAN ( string  key,
int  cursor,
string  match_pattern = "",
int  count_count = 0 
)

HSCAN

Incrementally iterate hash fields and associated values

Time complexity: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.. Annotated return value:

Definition at line 5619 of file nwnx_redis_short.nss.

◆ ZSCAN()

int ZSCAN ( string  key,
int  cursor,
string  match_pattern = "",
int  count_count = 0 
)

ZSCAN

Incrementally iterate sorted sets elements and associated scores

Time complexity: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.. Annotated return value:

Definition at line 5637 of file nwnx_redis_short.nss.

◆ XINFO()

int XINFO ( string  consumers_key = "",
string  consumers_groupname = "",
string  groups_key = "",
string  stream_key = "",
string  help = "" 
)

XINFO

Get information on streams and consumer groups

Time complexity: O(N) with N being the number of returned items for the subcommands CONSUMERS and GROUPS. The STREAM subcommand is O(log N) with N being the number of items in the stream.

  • Valid values for help: "HELP" Annotated return value:

Definition at line 5655 of file nwnx_redis_short.nss.

◆ XADD()

int XADD ( string  key,
string  ID,
string  field,
string  str 
)

XADD

Appends a new entry to a stream

Time complexity: O(1) Annotated return value: bulk-string

Definition at line 5676 of file nwnx_redis_short.nss.

◆ XTRIM()

int XTRIM ( string  key,
string  strategy,
string  approx = "",
int  count = 0 
)

XTRIM

Trims the stream to (approximately if '~' is passed) a certain size

Time complexity: O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.

  • Valid values for strategy: "MAXLEN"
  • Valid values for approx: "~" Annotated return value: integer

Definition at line 5692 of file nwnx_redis_short.nss.

◆ XDEL()

int XDEL ( string  key,
string  ID 
)

XDEL

Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist.

Time complexity: O(1) for each single item to delete in the stream, regardless of the stream size. Annotated return value: integer

Definition at line 5710 of file nwnx_redis_short.nss.

◆ XRANGE()

int XRANGE ( string  key,
string  start,
string  end,
int  count_count = 0 
)

XRANGE

Return a range of elements in a stream, with IDs matching the specified IDs interval

Time complexity: O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). Annotated return value: array

Definition at line 5721 of file nwnx_redis_short.nss.

◆ XREVRANGE()

int XREVRANGE ( string  key,
string  end,
string  start,
int  count_count = 0 
)

XREVRANGE

Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE

Time complexity: O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). Annotated return value: array

Definition at line 5737 of file nwnx_redis_short.nss.

◆ XLEN()

int XLEN ( string  key)

XLEN

Return the number of entires in a stream

Time complexity: O(1) Annotated return value: integer

Definition at line 5753 of file nwnx_redis_short.nss.

◆ XREAD()

int XREAD ( int  count_count = 0,
int  block_milliseconds = 0,
string  streams = "",
string  key = "",
string  ID = "" 
)

XREAD

Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.

Time complexity: For each stream mentioned: O(N) with N being the number of elements being returned, it menas that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data.

  • Valid values for streams: "STREAMS" Annotated return value: array

Definition at line 5762 of file nwnx_redis_short.nss.

◆ XGROUP()

int XGROUP ( string  create_key = "",
string  create_groupname = "",
string  create_id_or__ = "",
string  setid_key = "",
string  setid_groupname = "",
string  setid_id_or__ = "",
string  destroy_key = "",
string  destroy_groupname = "",
string  delconsumer_key = "",
string  delconsumer_groupname = "",
string  delconsumer_consumername = "" 
)

XGROUP

Create, destroy, and manage consumer groups.

Time complexity: O(1) for all the subcommands, with the exception of the DESTROY subcommand which takes an additional O(M) time in order to delete the M entries inside the consumer group pending entries list (PEL). Annotated return value:

Definition at line 5782 of file nwnx_redis_short.nss.

◆ XREADGROUP()

int XREADGROUP ( string  group_group,
string  group_consumer,
int  count_count = 0,
int  block_milliseconds = 0,
string  noack = "",
string  streams = "",
string  key = "",
string  ID = "" 
)

XREADGROUP

Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.

Time complexity: For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.

  • Valid values for noack: "NOACK"
  • Valid values for streams: "STREAMS" Annotated return value:

Definition at line 5815 of file nwnx_redis_short.nss.

◆ XACK()

int XACK ( string  key,
string  group,
string  ID 
)

XACK

Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL.

Time complexity: O(1) for each message ID processed. Annotated return value: integer

Definition at line 5842 of file nwnx_redis_short.nss.

◆ XCLAIM()

int XCLAIM ( string  key,
string  group,
string  consumer,
string  min_idle_time,
string  ID,
int  idle_ms = 0,
int  time_ms_unix_time = 0,
int  retrycount_count = 0 
)

XCLAIM

Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.

Time complexity: O(log N) with N being the number of messages in the PEL of the consumer group. Annotated return value: array

Definition at line 5855 of file nwnx_redis_short.nss.

◆ XPENDING()

int XPENDING ( string  key,
string  group,
string  start = "",
string  end = "",
int  count = 0,
string  consumer = "" 
)

XPENDING

Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.

Time complexity: O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). When the command returns just the summary it runs in O(1) time assuming the list of consumers is small, otherwise there is additional O(N) time needed to iterate every consumer. Annotated return value: array

Definition at line 5881 of file nwnx_redis_short.nss.