lset method
LSET command (set value that placed in index
)
Implementation
@override
Future<bool> lset(K key, int index, V value) async {
final keyString = keyCodec.encode<K>(key);
final valueString = valueCodec.encode<V>(value);
_connection
.sendCommand(Resp(['LSET', keyString, index.toString(), valueString]));
final res = await _connection.receive();
res.throwIfError();
return res.stringValue == 'OK';
}