ZAddCommand class final

Represents the 'ZADD key NX|XX CH INCR score member score member ...' command.

Redis Command:

ZADD myzset 1.0 member1 2.0 member2

Redis Reply (Example):

:2

Dart Result (from parse method): int resolving to 2 (number of elements added) or double (if INCR is true)

Inheritance
Mixed-in types

Constructors

ZAddCommand(String key, Map<String, double> membersWithScores, {bool onlyIfNotExists = false, bool onlyIfAlreadyExists = false, bool changed = false, bool incr = false})

Properties

changed bool
Return the number of elements that were changed (added or updated).
final
commandParts List<String>
The command and its arguments, to be implemented by each subclass.
no setteroverride
encoded List<int>
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
incr bool
When this option is used, ZADD acts like ZINCRBY.
final
key String
final
membersWithScores Map<String, double>
final
onlyIfAlreadyExists bool
Only update existing elements. Don't add new elements.
final
onlyIfNotExists bool
Only add new elements. Don't update existing scores.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyPrefix(String prefix) ValkeyCommand
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(dynamic data) → dynamic
The parser for the response, to be implemented by each subclass.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited