All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.json.commands.RedisJsonV2PipelineCommands Maven / Gradle / Ivy

The newest version!
package redis.clients.jedis.json.commands;

import java.util.List;
import org.json.JSONArray;
import redis.clients.jedis.Response;
import redis.clients.jedis.json.JsonSetParams;
import redis.clients.jedis.json.Path2;

public interface RedisJsonV2PipelineCommands {

  default Response jsonSet(String key, Object object) {
    return jsonSet(key, Path2.ROOT_PATH, object);
  }

  default Response jsonSetWithEscape(String key, Object object) {
    return jsonSetWithEscape(key, Path2.ROOT_PATH, object);
  }

  default Response jsonSet(String key, Object object, JsonSetParams params) {
    return jsonSet(key, Path2.ROOT_PATH, object, params);
  }

  default Response jsonSetWithEscape(String key, Object object, JsonSetParams params) {
    return jsonSetWithEscape(key, Path2.ROOT_PATH, object, params);
  }

  Response jsonSet(String key, Path2 path, Object object);

  Response jsonSetWithEscape(String key, Path2 path, Object object);

  Response jsonSet(String key, Path2 path, Object object, JsonSetParams params);

  Response jsonSetWithEscape(String key, Path2 path, Object object, JsonSetParams params);

  Response jsonMerge(String key, Path2 path, Object object);

  Response jsonGet(String key); // both ver

  Response jsonGet(String key, Path2... paths);

  default Response> jsonMGet(String... keys) {
    return jsonMGet(Path2.ROOT_PATH, keys);
  }

  Response> jsonMGet(Path2 path, String... keys);

  Response jsonDel(String key); // both ver

  Response jsonDel(String key, Path2 path);

  Response jsonClear(String key); // no test

  Response jsonClear(String key, Path2 path);

  Response> jsonToggle(String key, Path2 path);

  Response>> jsonType(String key, Path2 path);

  Response> jsonStrAppend(String key, Path2 path, Object string);

  Response> jsonStrLen(String key, Path2 path);

  Response jsonNumIncrBy(String key, Path2 path, double value);

  Response> jsonArrAppend(String key, Path2 path, Object... objects);

  Response> jsonArrAppendWithEscape(String key, Path2 path, Object... objects);

  Response> jsonArrIndex(String key, Path2 path, Object scalar);

  Response> jsonArrIndexWithEscape(String key, Path2 path, Object scalar);

  Response> jsonArrInsert(String key, Path2 path, int index, Object... objects);

  Response> jsonArrInsertWithEscape(String key, Path2 path, int index, Object... objects);

  Response> jsonArrPop(String key, Path2 path);

  Response> jsonArrPop(String key, Path2 path, int index);

  Response> jsonArrLen(String key, Path2 path);

  Response> jsonArrTrim(String key, Path2 path, int start, int stop);
}