ValkeyCommandsBase class abstract
The abstract base class for all common Valkey data commands.
Both the standalone client (ValkeyClientBase) and the cluster client (ValkeyClusterClientBase) implement this interface.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decr(
String key) → Future< int> -
Decrements the number stored at
keyby one. -
decrBy(
String key, int amount) → Future< int> -
Decrements the number stored at
keybyamount. -
del(
String key) → Future< int> -
Deletes the specified
key. -
echo(
String message) → Future< String> -
Echoes the given
messageback from the server. -
exists(
String key) → Future< int> -
Checks if
keyexists. -
expire(
String key, int seconds) → Future< int> -
Sets a timeout on
keyin seconds. -
get(
String key) → Future< String?> -
Gets the value of
key. -
hget(
String key, String field) → Future< String?> -
Gets the value of
fieldin the hash stored atkey. -
hgetall(
String key) → Future< Map< String, String> > -
Gets all fields and values of the hash stored at
key. -
hset(
String key, String field, String value) → Future< int> -
Sets
fieldin the hash stored atkeytovalue. -
incr(
String key) → Future< int> -
Increments the number stored at
keyby one. -
incrBy(
String key, int amount) → Future< int> -
Increments the number stored at
keybyamount. -
lpop(
String key) → Future< String?> -
Removes and returns the first element of the list stored at
key. -
lpush(
String key, String value) → Future< int> -
Prepends
valueto the list stored atkey. -
lrange(
String key, int start, int stop) → Future< List< String?> > -
Returns the specified elements of the list stored at
key. -
mget(
List< String> keys) → Future<List< String?> > -
Gets the values of all specified
keys. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rpop(
String key) → Future< String?> -
Removes and returns the last element of the list stored at
key. -
rpush(
String key, String value) → Future< int> -
Appends
valueto the list stored atkey. -
sadd(
String key, String member) → Future< int> -
Adds
memberto the set stored atkey. -
set(
String key, String value) → Future< String> -
Sets
keytovalue. -
smembers(
String key) → Future< List< String?> > -
Returns all members of the set stored at
key. -
spublish(
String channel, String message) → Future< int> -
Posts a
messageto the givenchannelusing Sharded Pub/Sub. Returns the number of clients that received the message. Note: In Cluster mode, this command is routed to the specific node that owns the slot forchannel. -
srem(
String key, String member) → Future< int> -
Removes
memberfrom the set stored atkey. -
ssubscribe(
List< String> channels) → Subscription -
Subscribes the client to the specified
channelsusing Sharded Pub/Sub. -
sunsubscribe(
[List< String> channels = const []]) → Future<void> -
Unsubscribes from the given
channelsusing Sharded Pub/Sub. -
toString(
) → String -
A string representation of this object.
inherited
-
ttl(
String key) → Future< int> -
Gets the remaining time to live of a
keyin seconds. -
zadd(
String key, double score, String member) → Future< int> -
Adds
memberwith the specifiedscoreto the sorted set stored atkey. -
zrange(
String key, int start, int stop) → Future< List< String?> > -
Returns the specified range of members in the sorted set stored at
key, ordered from lowest to highest score. -
zrem(
String key, String member) → Future< int> -
Removes
memberfrom the sorted set stored atkey.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited