Package io.quarkus.redis.datasource.json
Interface TransactionalJsonCommands<K>
- All Superinterfaces:
TransactionalRedisCommands
- All Known Implementing Classes:
BlockingTransactionalJsonCommandsImpl
-
Method Summary
Modifier and TypeMethodDescription<T> void
jsonArrAppend
(K key, String path, T... values) Execute the command JSON.ARRAPPEND.default <T> void
jsonArrIndex
(K key, String path, T value) Execute the command JSON.ARRINDEX.<T> void
jsonArrIndex
(K key, String path, T value, int start, int end) Execute the command JSON.ARRINDEX.<T> void
jsonArrInsert
(K key, String path, int index, T... values) Execute the command JSON.ARRINSERT.void
jsonArrLen
(K key, String path) Execute the command JSON.ARRLEN.default <T> void
jsonArrPop
(K key, Class<T> clazz, String path) Execute the command JSON.ARRPOP.<T> void
jsonArrPop
(K key, Class<T> clazz, String path, int index) Execute the command JSON.ARRPOP.void
jsonArrTrim
(K key, String path, int start, int stop) Execute the command JSON.ARRTRIM.default void
Execute the command JSON.CLEAR.void
Execute the command JSON.CLEAR.default void
Execute the command JSON.DEL.void
Execute the command JSON.DEL.<T> void
Execute the command JSON.GET.void
Execute the command JSON.GET.void
Execute the command JSON.GET.void
jsonGetArray
(K key) Execute the command JSON.GET.void
jsonGetObject
(K key) Execute the command JSON.GET.void
Execute the command JSON.MGET.void
jsonNumincrby
(K key, String path, double value) Execute the command JSON.NUMINCRBY.void
jsonObjKeys
(K key, String path) Execute the command JSON.OBJKEYS.void
jsonObjLen
(K key, String path) Execute the command JSON.OBJLEN.default void
Execute the command JSON.SET.default void
Execute the command JSON.SET.void
Execute the command JSON.SET.void
jsonSet
(K key, String path, io.vertx.core.json.JsonArray json, JsonSetArgs args) Execute the command JSON.SET.void
Execute the command JSON.SET.void
jsonSet
(K key, String path, io.vertx.core.json.JsonObject json, JsonSetArgs args) Execute the command JSON.SET.<T> void
Execute the command JSON.SET.<T> void
jsonSet
(K key, String path, T value, JsonSetArgs args) Execute the command JSON.SET.default <T> void
Execute the command JSON.SET.void
jsonStrAppend
(K key, String path, String value) Execute the command JSON.STRAPPEND.void
jsonStrLen
(K key, String path) Execute the command JSON.STRLEN.void
jsonToggle
(K key, String path) Execute the command JSON.TOGGLE.void
Execute the command JSON.TYPE.Methods inherited from interface io.quarkus.redis.datasource.TransactionalRedisCommands
getDataSource
-
Method Details
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Type Parameters:
T
- the type for the value- Parameters:
key
- the key, must not benull
path
- the path, must not benull
value
- the value, encoded to JSON
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Type Parameters:
T
- the type for the value- Parameters:
key
- the key, must not benull
value
- the value, encoded to JSON
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- the path, must not benull
json
- the JSON object to store, must not benull
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: jsonThis variant uses
$
as path.- Parameters:
key
- the key, must not benull
json
- the JSON object to store, must not benull
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Parameters:
key
- the key, must not benull
json
- the JSON array to store, must not benull
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- the path, must not benull
json
- the JSON object to store, must not benull
args
- the extra arguments
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- the path, must not benull
json
- the JSON array to store, must not benull
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- the path, must not benull
json
- the JSON array to store, must not benull
args
- the extra arguments
-
jsonSet
Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- the path, must not benull
value
- the value to store, encoded to JSON.args
- the extra arguments
-
jsonGet
Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: jsonThis method uses the root path (
$
). It maps the retrieve JSON document to an object of type<T>
.- Parameters:
key
- the key, must not benull
clazz
- the type of object to recreate from the JSON content
-
jsonGetObject
Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: jsonThis method uses the root path (
$
). UnlikejsonGet(Object, Class)
, it returns aJsonObject
.- Parameters:
key
- the key, must not benull
-
jsonGetArray
Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: jsonThis method uses the root path (
$
). UnlikejsonGet(Object, Class)
, it returns aJsonArray
.- Parameters:
key
- the key, must not benull
-
jsonGet
Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json- Parameters:
key
- the key, must not benull
path
- the path, must not benull
-
jsonGet
Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json- Parameters:
key
- the key, must not benull
paths
- the paths, must not benull
. If no path are passed, this is equivalent tojsonGetObject(Object)
, if multiple paths are passed, the produced JSON object contains the result (as a json array) for each path.
-
jsonArrAppend
Execute the command JSON.ARRAPPEND. Summary: Append the json values into the array at path after the last element in it. Group: json- Type Parameters:
T
- the type of value- Parameters:
key
- the key, must not benull
path
- the path, must not benull
values
- the values to append, encoded to JSON
-
jsonArrIndex
Execute the command JSON.ARRINDEX. Summary: Searches for the first occurrence of a scalar JSON value in an array. Group: json- Type Parameters:
T
- the type of value- Parameters:
key
- the key, must not benull
path
- the path, must not benull
value
- the value to be searched, encoded to JSONstart
- the start indexend
- the end index
-
jsonArrIndex
Execute the command JSON.ARRINDEX. Summary: Searches for the first occurrence of a scalar JSON value in an array. Group: json- Type Parameters:
T
- the type of value- Parameters:
key
- the key, must not benull
path
- the path, must not benull
value
- the value to be searched, encoded to JSON
-
jsonArrInsert
Execute the command JSON.ARRINSERT. Summary: Inserts the json values into the array at path before the index (shifts to the right). Group: json- Type Parameters:
T
- the type of value- Parameters:
key
- the key, must not benull
path
- the path, must not benull
index
- the index. The index must be in the array's range. Inserting at index 0 prepends to the array. Negative index values start from the end of the array.values
- the values to insert, encoded to JSON
-
jsonArrLen
Execute the command JSON.ARRLEN. Summary: Reports the length of the JSON Array at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- the path,null
means$
-
jsonArrPop
Execute the command JSON.ARRPOP. Summary: Removes and returns an element from the index in the array. Group: json- Parameters:
key
- the key, must not benull
clazz
- the type of the popped objectpath
- path the path, defaults to root if not provided.index
- is the position in the array to start popping from (defaults to -1, meaning the last element). Out-of-range indexes round to their respective array ends.
-
jsonArrPop
Execute the command JSON.ARRPOP. Summary: Removes and returns an element from the index in the array. Group: json- Parameters:
key
- the key, must not benull
clazz
- the type of the popped objectpath
- path the path, defaults to root if not provided.
-
jsonArrTrim
Execute the command JSON.ARRTRIM. Summary: Trims an array so that it contains only the specified inclusive range of elements. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, must not benull
start
- the start indexstop
- the stop index
-
jsonClear
Execute the command JSON.CLEAR. Summary: Clears container values (Arrays/Objects), and sets numeric values to 0. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided. Non-existing paths are ignored.
-
jsonClear
Execute the command JSON.CLEAR. Summary: Clears container values (Arrays/Objects), and sets numeric values to 0. Group: json- Parameters:
key
- the key, must not benull
-
jsonDel
Execute the command JSON.DEL. Summary: Deletes a value. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided. Non-existing paths are ignored.
-
jsonDel
Execute the command JSON.DEL. Summary: Deletes a value. Group: json- Parameters:
key
- the key, must not benull
-
jsonMget
Execute the command JSON.MGET. Summary: Returns the values at path from multiple key arguments. Returnsnull
for nonexistent keys and nonexistent paths. Group: json- Parameters:
path
- path the pathkeys
- the keys, must not benull
, must not containnull
-
jsonNumincrby
Execute the command JSON.NUMINCRBY. Summary: Increments the number value stored at path by number. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided. Non-existing paths are ignored.value
- the value to add
-
jsonObjKeys
Execute the command JSON.OBJKEYS. Summary: Returns the keys in the object that's referenced by path. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided.
-
jsonObjLen
Execute the command JSON.OBJLEN. Summary: Reports the number of keys in the JSON Object at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided.
-
jsonStrAppend
Execute the command JSON.STRAPPEND. Summary: Appends the json-string values to the string at path. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided.value
- the string to append, must not benull
-
jsonStrLen
Execute the command JSON.STRLEN. Summary: Reports the length of the JSON String at path in key. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided.
-
jsonToggle
Execute the command JSON.TOGGLE. Summary: Toggle a boolean value stored at path. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, must not benull
-
jsonType
Execute the command JSON.TYPE. Summary: Reports the type of JSON value at path. Group: json- Parameters:
key
- the key, must not benull
path
- path the path, path defaults to$
if not provided.
-