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

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

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

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

public interface RedisJsonV2Commands {

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

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

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

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

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

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

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

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

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

  Object jsonGet(String key); // both ver

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

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

  List jsonMGet(Path2 path, String... keys);

  long jsonDel(String key); // both ver

  long jsonDel(String key, Path2 path);

  long jsonClear(String key); // no test

  long jsonClear(String key, Path2 path);

  List jsonToggle(String key, Path2 path);

  List> jsonType(String key, Path2 path);

  List jsonStrAppend(String key, Path2 path, Object string);

  List jsonStrLen(String key, Path2 path);

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

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

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

  List jsonArrIndex(String key, Path2 path, Object scalar);

  List jsonArrIndexWithEscape(String key, Path2 path, Object scalar);

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

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

  List jsonArrPop(String key, Path2 path);

  List jsonArrPop(String key, Path2 path, int index);

  List jsonArrLen(String key, Path2 path);

  List jsonArrTrim(String key, Path2 path, int start, int stop);

  List jsonObjLen(String key, Path2 path);

  List> jsonObjKeys(String key, Path2 path);

  List jsonDebugMemory(String key, Path2 path);
}