package io.quarkus.redis.datasource.hash;
import java.util.List;
import java.util.Map;
import io.quarkus.redis.datasource.ReactiveRedisCommands;
import io.quarkus.redis.datasource.ScanArgs;
import io.smallrye.mutiny.Uni;
/**
* Allows executing commands from the {@code hash} group.
* See the hash command list for further information about these commands.
*
* A {@code hash} is a like a {@code Map<F, V>}.
* This group is parameterized by the type of the key {@code Map<K>}. This is the type of the key in which the hash is
* stored.
* {@code <F>} is the type of the key in the map (field). The stored value are of type {@code Map<V>}
*
* @param the type of the key
* @param the type of the field
* @param the type of the value
*/
public interface ReactiveHashCommands extends ReactiveRedisCommands {
/**
* Execute the command HDEL.
* Summary: Delete one or more hash fields
* Group: hash
* Requires Redis 2.0.0
*
* @param key the key
* @return the number of fields that were removed from the hash, not including specified but
* non-existing fields.
**/
Uni hdel(K key, F... fields);
/**
* Execute the command HEXISTS.
* Summary: Determine if a hash field exists
* Group: hash
* Requires Redis 2.0.0
*
* @param key the key
* @param field the value
* @return {@code true} the hash contains field. {@code false} the hash does not contain field, or the key
* does not exist.
**/
Uni hexists(K key, F field);
/**
* Execute the command HGET.
* Summary: Get the value of a hash field
* Group: hash
* Requires Redis 2.0.0
*
* @param key the key
* @param field the value
* @return the value associated with {@code field}, or {@code null} when {@code field} is not present in
* the hash or the key does not exist.
**/
Uni hget(K key, F field);
/**
* Execute the command HINCRBY.
* Summary: Increment the integer value of a hash field by the given number
* Group: hash
* Requires Redis 2.0.0
*
* @param key the key
* @param field the value
* @return the value at field after the increment operation.
**/
Uni hincrby(K key, F field, long amount);
/**
* Execute the command HINCRBYFLOAT.
* Summary: Increment the float value of a hash field by the given amount
* Group: hash
* Requires Redis 2.6.0
*
* @param key the key
* @param field the value
* @return the value of field after the increment.
**/
Uni hincrbyfloat(K key, F field, double amount);
/**
* Execute the command HGETALL.
* Summary: Get all the fields and values in a hash
* Group: hash
* Requires Redis 2.0.0
*
* @param key the key
* @return the map fields -> values stored in the hash, or an empty map when {@code key} does not exist.
**/
Uni