RedisClient class
Methods
-
addSet(String key, dynamic member, [List? members])
→ Future<RedisReply>
-
SADD - Adds a member or more to a Set
-
allKeys()
→ Future<RedisReply>
-
(KEYS *) - Get all keys
-
append(String key, dynamic value)
→ Future<RedisReply>
-
APPEND - Appends a value to a key
-
close()
→ Future<void>
-
Closes the connection
-
command(String cmd, [List? args])
→ Future<RedisReply>
-
Sends a Redis command to the server
-
decrement(String key)
→ Future<RedisReply>
-
DECR - Decrements the key
-
decrementBy(String key, int amount)
→ Future<RedisReply>
-
DECRBY - Decrements an integer by amout
-
delete(String key)
→ Future<RedisReply>
-
DEL - Delete a key-value pair
-
deleteAllDBs()
→ Future<RedisReply>
-
FLUSHALL - Delete all the keys from all databases
-
deleteAllKeys()
→ Future<RedisReply>
-
FLUSHDB - Delete all the keys from the current database
-
deleteField(String key, String field, [List<String>? fields])
→ Future<RedisReply>
-
HDEL - Deletes a field from a Hash
-
elementAt(String key, int index)
→ Future<RedisReply>
-
LINDEX - Gets the element of a list at the index
-
exists(String key, [List<String>? keys])
→ Future<RedisReply>
-
EXISTS - Check if a key or list of keys exists
-
existsField(String key, String field)
→ Future<RedisReply>
-
HEXISTS - Checks if a Hash field exists
-
expire(String key, Duration timeout)
→ Future<RedisReply>
-
EXPIRE - Expires a key with the timeout.
-
expireAt(String key, DateTime dateTime)
→ Future<RedisReply>
-
EXPIREAT - Expires a key with a DateTime
(e.g. await client.expireAt('num', DateTime(2021, 4, 18))
-
get(String key)
→ Future<RedisReply>
-
GET - Get a value from a key
-
getField(String key, String field)
→ Future<RedisReply>
-
HGET - Gets a Hash field
-
getMap(String key)
→ Future<RedisReply>
-
HGETALL - Gets all the fields from a Hash (returning a Dart Map)
-
getRange(String key, int start, int end)
→ Future<RedisReply>
-
GETRANGE - Get a range of a value of a key
-
increment(String key)
→ Future<RedisReply>
-
INCR - Increment a key
-
incrementBy(String key, int amount)
→ Future<RedisReply>
-
INCRBY - Increment a key with the amount
-
incrementFieldBy(String key, String field, num value)
→ Future<RedisReply>
-
HINCRBY or HINCRBYFLOAT - Increments a field from a Hash (int or float)
-
insertAfter(String key, dynamic after, dynamic value)
→ Future<RedisReply>
-
LINSERT AFTER - Inserts in the list after a specified key
-
insertBefore(String key, dynamic before, dynamic value)
→ Future<RedisReply>
-
LINSERT BEFORE - Inserts in the list before a specified key
-
isMember(String key, dynamic member)
→ Future<RedisReply>
-
SISMEMBER - Checks if a member exists in a Set
-
keys(String pattern)
→ Future<RedisReply>
-
KEYS - Get keys with pattern
-
listLength(String key)
→ Future<RedisReply>
-
LLEN - Gets the list length
-
listRange(String key, int start, int stop)
→ Future<RedisReply>
-
LRANGE - Gets a list in a range
-
mapKeys(String key)
→ Future<RedisReply>
-
HKEYS - Gets the keys of a Hash
-
mapLength(String key)
→ Future<RedisReply>
-
HLEN - Gets the length of a Hash
-
mapValues(String key)
→ Future<RedisReply>
-
HVALS - Gets the values of a Hash
-
members(String key)
→ Future<RedisReply>
-
SMEMBERS - Gets the members of a Set
-
multiGet(List<String> keys)
→ Future<RedisReply>
-
MGET - Get a list of values from a list of keys
-
multiSet({required List<String> keys, required List values})
→ Future<RedisReply>
-
MSET - Set a list of keys with a list of values
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
popFirst(String key, [int? count])
→ Future<RedisReply>
-
LPOP - Pops the first element of a list (head)
-
popLast(String key, [int? count])
→ Future<RedisReply>
-
RPOP - Pops the last element of a list (tail)
-
popSet(String key, [int? count])
→ Future<RedisReply>
-
SPOP - Pops a random member from a Set
-
pushFirst(String key, dynamic element, [List? elements])
→ Future<RedisReply>
-
LPUSH - Pushes a element or a list of them to the head (first)
-
pushLast(String key, dynamic element, [List? elements])
→ Future<RedisReply>
-
RPUSH - Pushes a element or a list of them to the tail (last)
-
removeMember(String key, dynamic member, [List? members])
→ Future<RedisReply>
-
SREM - Removes a member of a Set
-
set(String key, dynamic value)
→ Future<RedisReply>
-
SET - Set a key with a value
-
setMap(String key, Map<String, dynamic> value)
→ Future<RedisReply>
-
HSET - Sets a Redis Hash (with a Dart Map)
-
setNotExists(String key, dynamic value)
→ Future<RedisReply>
-
SETNX - Set a key with a value only if the key does not exist
-
setRange(String key, int offset, dynamic value)
→ Future<RedisReply>
-
SETRANGE - Set value at offset of a key
-
strlen(String key)
→ Future<RedisReply>
-
STRLEN - Gets the length of the value stored in the key
-
timeToLive(String key)
→ Future<RedisReply>
-
TTL - Gets the Time To Live (ttl) of a key with expiry
-
toString()
→ String
-
A string representation of this object.
inherited