2
respostas

Esse comando não existe. Seria uma melhor prática usar o INCRBYFLOAT com negativo?

(error) ERR unknown command 'DECRBYFLOAT'

Matricule-se agora e aproveite até 50% OFF

O maior desconto do ano para você evoluir com a maior escola de tecnologia

QUERO APROVEITAR
2 respostas

Opa Bruno, olhando a documentação do redis ele não fala sobre esse comando. Tem o decr, mas não seguido pelo tipo do dado => https://redis.io/commands/decrby

De acordo com a documentação, deve ser utilizado o INCRBYFLOAT negativo...

Increment the string representing a floating point number stored at key by the specified increment. By using a negative increment value, the result is that the value stored at the key is decremented (by the obvious properties of addition). If the key does not exist, it is set to 0 before performing the operation. An error is returned if one of the following conditions occur: