Search code examples
hashredisspring-dataspring-data-redis

is spring-data-redis (opsForHash) get the same as hgetall?


I was doing the interactive tutorial al http://try.redis.io. while reading the spring data redis I have not come across that method but came across a get (without the "all")

/**
 * Get value for given {@code hashKey} from hash at {@code key}.
 *
 * @param key must not be {@literal null}.
 * @param hashKey must not be {@literal null}.
 * @return
 */
HV get(H key, Object hashKey);

I was wondering if they were the same? also if they are the same there is not a method like hget (that only gets one value)?


Solution

  • I had forgotten I made this question.

    Yes it is, when you are querying redis for the data of a key you bring all the respective information