dart_valkey library

Classes

AppendCommand
Represents the 'APPEND key value' command. Appends a value to a key.
AuthCommand
Represents the 'AUTH username password' command.
BaseRespCodec
BaseSetCommand<T>
BaseValkeyClient
Base class for Valkey and Valkey Pub/Sub clients, providing common connection management.
ClientCachingCommand
Represents the 'CLIENT CACHING' command.
ClientGetnameCommand
Represents the 'CLIENT GETNAME' command.
ClientGetredirCommand
Represents the 'CLIENT GETREDIR' command.
ClientHelpCommand
Represents the 'CLIENT HELP' command.
ClientIdCommand
Represents the 'CLIENT ID' command.
ClientNoEvictCommand
Represents the 'CLIENT NO-EVICT' command.
ClientNoTouchCommand
Represents the 'CLIENT NO-TOUCH' command.
ClientSetnameCommand
Represents the 'CLIENT SETNAME connection-name' command.
ClientUnblockCommand
ClientUnpauseCommand
Represents the 'CLIENT UNPAUSE' command.
Command<T>
The base class for all commands in the Valkey client.
Connection
Public interface for a connection to a Valkey/Redis server.
DecrByCommand
Represents the 'DECRBY key decrement' command. Decrements the number stored at key by decrement.
DecrCommand
Represents the 'DECR key' command. Decrements the number stored at key by one.
DelCommand
Represents the 'DEL key key ...' command. Deletes one or more keys.
EchoCommand
Represents the 'ECHO message' command.
EvalCommand
Represents the 'EVAL' command.
ExistsCommand
Represents the 'EXISTS key key ...' command. Determines if one or more keys exist.
ExpireAt
ExpireCommand
Represents the 'EXPIRE key seconds NX|XX|GT|LT' command.
ExpireDuration
ExpireOption
GetCommand
Represents the 'GET key' command.
GetRangeCommand
Represents the 'GETRANGE key start end' command. Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
GetSetCommand
Represents the 'GETSET key value' command. Atomically sets key to value and returns the old value stored at key.
HDelCommand
Represents the 'HDEL key field field ...' command.
HelloCommand
Represents the 'HELLO' command.
HExistsCommand
Represents the 'HEXISTS key field' command.
HGetAllCommand
Represents the 'HGETALL key' command.
HGetCommand
Represents the 'HGET key field' command.
HIncrByCommand
Represents the 'HINCRBY key field increment' command.
HIncrByFloatCommand
Represents the 'HINCRBYFLOAT key field increment' command. Increments the float value of a field in a hash by the given amount.
HKeysCommand
Represents the 'HKEYS key' command. Returns all field names in the hash stored at key.
HLenCommand
Represents the 'HLEN key' command.
HMGetCommand
Represents the 'HMGET key field field ...' command.
HSetCommand
Represents the 'HSET key field value field value ...' command.
HSetNxCommand
Represents the 'HSETNX key field value' command. Sets field in the hash stored at key to value, only if field does not yet exist.
HStrLenCommand
Represents the 'HSTRLEN key field' command. Returns the string length of the value associated with field in the hash stored at key.
HValsCommand
Represents the 'HVALS key' command. Returns all values in the hash stored at key.
IncrByCommand
Represents the 'INCRBY key increment' command. Increments the number stored at key by increment.
IncrCommand
Represents the 'INCR key' command.
InsecureConnection
KeepTtl
LIndexCommand
Represents the 'LINDEX key index' command.
LInsertCommand
Represents the 'LINSERT key BEFORE|AFTER pivot value' command. Inserts an element before or after another element in a list.
LLenCommand
Represents the 'LLEN key' command.
LPopCommand
Represents the 'LPOP key count' command.
LPushCommand
Represents the 'LPUSH key value value ...' command.
LRangeCommand
Represents the 'LRANGE key start stop' command.
LRemCommand
Represents the 'LREM key count value' command. Removes the first count occurrences of elements equal to value from the list stored at key.
LTrimCommand
Represents the 'LTRIM key start stop' command.
MGetCommand
Represents the 'MGET key key ...' command. Returns the values of all specified keys.
MSetCommand
Represents the 'MSET key value key value ...' command. Sets multiple key-value pairs in a single atomic operation.
ParseResult<T>
PersistCommand
Represents the 'PERSIST key' command. Removes the expiration from a key.
PingCommand
Represents the 'PING message' command.
PSubscribeCommand
Represents the PSUBSCRIBE pattern [pattern ...] command.
PublishCommand
Represents the PUBLISH channel message command.
PubsubChannelsCommand
Represents the 'PUBSUB CHANNELS pattern' command. Lists the currently active channels.
PubSubCommand<T>
The base class for all Pub/Sub specific commands.
PubsubHelpCommand
Represents the 'PUBSUB HELP' command. Returns a help text.
PubSubMessage
Represents a message received from a Pub/Sub channel.
PubsubNumpatCommand
Represents the 'PUBSUB NUMPAT' command. Returns the number of subscriptions to patterns.
PubsubNumsubCommand
Represents the 'PUBSUB NUMSUB channel-1 ... channel-N' command. Returns the number of subscribers for the specified channels.
PubsubShardchannelsCommand
Represents the 'PUBSUB SHARDCHANNELS pattern' command. Lists the currently active shard channels.
PubsubShardnumsubCommand
Represents the 'PUBSUB SHARDNUMSUB channel-1 ... channel-N' command. Returns the number of subscribers for the specified shard channels.
PUnsubscribeCommand
Represents the PUNSUBSCRIBE [pattern [pattern ...]] command.
QuitCommand
Represents the 'QUIT' command.
RenameCommand
Represents the 'RENAME key newkey' command. Renames a key.
RenameNxCommand
Represents the 'RENAMENX key newkey' command. Renames a key, only if the new key does not exist.
ResetCommand
Represents the 'RESET' command.
Resp2Decoder
Resp3Decoder
RespEncoder
RPopCommand
Represents the 'RPOP key count' command.
RPopLPushCommand
Represents the 'RPOPLPUSH source destination' command. Atomically removes the last element from source, and pushes it to the head of destination.
RPushCommand
Represents the 'RPUSH key value value ...' command.
SAddCommand
Represents the 'SADD key member member ...' command.
SCardCommand
Represents the 'SCARD key' command.
SDiffCommand
Represents the 'SDIFF key key ...' command. Returns the members of the set resulting from the difference between the first set and all the successive sets.
SDiffStoreCommand
Represents the 'SDIFFSTORE destination key key ...' command. Stores the members of the set resulting from the difference between the first set and all the successive sets in destination.
SecureConnection
SelectCommand
Represents the SELECT command in Valkey.
SetAndGetCommand
Represents the 'SET key value GET' command.
SetCommand
SetRangeCommand
Represents the 'SETRANGE key offset value' command. Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.
SInterCommand
Represents the 'SINTER key key ...' command. Returns the members of the intersection of all the given sets.
SInterStoreCommand
Represents the 'SINTERSTORE destination key key ...' command. Stores the members of the intersection of all the given sets in destination.
SIsMemberCommand
Represents the 'SISMEMBER key member' command.
SMembersCommand
Represents the 'SMEMBERS key' command.
SMoveCommand
Represents the 'SMOVE source destination member' command. Moves member from the set at source to the set at destination.
SPopCommand
Represents the 'SPOP key' command. Removes and returns a random member from the set value stored at key.
SPopCountCommand
Represents the 'SPOP key count' command. Removes and returns multiple random members from the set value stored at key.
SpublishCommand
Represents the 'SPUBLISH channel message' command. Posts a message to a shard channel.
SRandMemberCommand
Represents the 'SRANDMEMBER key' command. Returns a random member from the set stored at key.
SRandMemberCountCommand
Represents the 'SRANDMEMBER key count' command. Returns an array of count random members from the set stored at key.
SRemCommand
Represents the 'SREM key member member ...' command.
SsubscribeCommand
Represents the SSUBSCRIBE channel [channel ...] command. Subscribes the client to one or more shard channels.
StrLenCommand
Represents the 'STRLEN key' command. Returns the length of the string value stored at key.
SubscribeCommand
Represents the SUBSCRIBE channel [channel ...] command.
SUnionCommand
Represents the 'SUNION key key ...' command. Returns the members of the union of all the given sets.
SUnionStoreCommand
Represents the 'SUNIONSTORE destination key key ...' command. Stores the members of the union of all the given sets in destination.
SunsubscribeCommand
Represents the SUNSUBSCRIBE [channel [channel ...]] command. Unsubscribes the client from one or more shard channels.
TtlCommand
Represents the 'TTL key' command. Gets the time to live for a key in seconds.
TypeCommand
Represents the 'TYPE key' command. Determines the type of a key.
UnsubscribeCommand
Represents the UNSUBSCRIBE [channel [channel ...]] command.
ValkeyCommand<T>
The base class for all Valkey commands.
ValkeyCommandClient
A type-safe, robust, and modular client for Valkey and Redis.
ValkeySubscriptionClient
Represents a client for Valkey's Pub/Sub functionality.
ZAddCommand
Represents the 'ZADD key NX|XX CH INCR score member score member ...' command.
ZCardCommand
Represents the 'ZCARD key' command.
ZCountCommand
Represents the 'ZCOUNT key min max' command.
ZIncrByCommand
Represents the 'ZINCRBY key increment member' command.
ZRangeByScoreCommand
Represents the 'ZRANGEBYSCORE key min max WITHSCORES LIMIT offset count' command. Returns all the elements in the sorted set at key with a score between min and max (inclusive).
ZRangeByScoreWithScoresCommand
Represents the 'ZRANGEBYSCORE key min max LIMIT offset count WITHSCORES' command. Returns all the elements in the sorted set at key with a score between min and max (inclusive), with their scores.
ZRangeCommand
Represents the 'ZRANGE key start stop BYLEX|BYSCORE REV LIMIT offset count WITHSCORES' command. Returns the specified range of elements in the sorted set stored at key.
ZRangeWithScoresCommand
Represents the 'ZRANGE key start stop WITHSCORES' command. Returns the specified range of elements in the sorted set stored at key, with their scores.
ZRankCommand
Represents the 'ZRANK key member' command. Returns the rank of member in the sorted set at key, with the scores ordered from low to high.
ZRemCommand
Represents the 'ZREM key member member ...' command.
ZRevRangeByScoreCommand
Represents the 'ZREVRANGEBYSCORE key max min WITHSCORES LIMIT offset count' command. Returns all the elements in the sorted set at key with a score between max and min (inclusive), with scores ordered from high to low.
ZRevRangeByScoreWithScoresCommand
Represents the 'ZREVRANGEBYSCORE key max min LIMIT offset count WITHSCORES' command. Returns all the elements in the sorted set at key with a score between max and min (inclusive), with scores ordered from high to low, with their scores.
ZRevRangeCommand
Represents the 'ZREVRANGE key start stop BYLEX|BYSCORE LIMIT offset count WITHSCORES' command. Returns the specified range of elements in the sorted set stored at key, with scores ordered from high to low.
ZRevRangeWithScoresCommand
Represents the 'ZREVRANGE key start stop BYLEX|BYSCORE LIMIT offset count WITHSCORES' command. Returns the specified range of elements in the sorted set stored at key, with scores ordered from high to low, with their scores.
ZRevRankCommand
Represents the 'ZREVRANK key member' command. Returns the rank of member in the sorted set at key, with the scores ordered from high to low.
ZScoreCommand
Represents the 'ZSCORE key member' command.

Constants

respArray → const int
respBigNumber → const int
respBlobError → const int
respBoolean → const int
respBulkString → const int
respCarriageReturn → const int
respDouble → const int
respError → const int
respFalse → const int
respInteger → const int
respLineFeed → const int
respMap → const int
respNull → const int
respPush → const int
respSet → const int
respSimpleString → const int
respTrue → const int
respVerbatimString → const int

Typedefs

ItemParser = ParseResult Function(Uint8List buffer, int offset)

Exceptions / Errors

RespException
ValkeyException