Class ReactiveGraphCommandsImpl<K>
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.AbstractRedisCommands
-
- io.quarkus.redis.runtime.datasource.AbstractGraphCommands<K>
-
- io.quarkus.redis.runtime.datasource.ReactiveGraphCommandsImpl<K>
-
- All Implemented Interfaces:
ReactiveGraphCommands<K>,ReactiveRedisCommands
public class ReactiveGraphCommandsImpl<K> extends AbstractGraphCommands<K> implements ReactiveGraphCommands<K>, ReactiveRedisCommands
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<K>typeOfKey-
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
marshaller, redis
-
-
Constructor Summary
Constructors Constructor Description ReactiveGraphCommandsImpl(ReactiveRedisDataSourceImpl redis, Class<K> k)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static List<Map<String,GraphQueryResponseItem>>decodeQueryResponse(io.vertx.mutiny.redis.client.Response r)ReactiveRedisDataSourcegetDataSource()io.smallrye.mutiny.Uni<Void>graphDelete(K key)Execute the command GRAPH.DELETE.io.smallrye.mutiny.Uni<String>graphExplain(K key, String query)Execute the command GRAPH.EXPLAIN.io.smallrye.mutiny.Uni<List<K>>graphList()Execute the command GRAPH.LIST.io.smallrye.mutiny.Uni<List<Map<String,GraphQueryResponseItem>>>graphQuery(K key, String query)Execute the command GRAPH.QUERY.io.smallrye.mutiny.Uni<List<Map<String,GraphQueryResponseItem>>>graphQuery(K key, String query, Duration timeout)Execute the command GRAPH.QUERY.-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractGraphCommands
_graphDelete, _graphExplain, _graphList, _graphQuery, _graphQuery
-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
execute
-
-
-
-
Constructor Detail
-
ReactiveGraphCommandsImpl
public ReactiveGraphCommandsImpl(ReactiveRedisDataSourceImpl redis, Class<K> k)
-
-
Method Detail
-
getDataSource
public ReactiveRedisDataSource getDataSource()
- Specified by:
getDataSourcein interfaceReactiveRedisCommands- Returns:
- the data source.
-
graphDelete
public io.smallrye.mutiny.Uni<Void> graphDelete(K key)
Description copied from interface:ReactiveGraphCommandsExecute the command GRAPH.DELETE. Summary: Completely removes the graph and all of its entities. Group: graph- Specified by:
graphDeletein interfaceReactiveGraphCommands<K>- Parameters:
key- the key, must not benull- Returns:
- a uni producing
nullwhen the operation completes
-
graphExplain
public io.smallrye.mutiny.Uni<String> graphExplain(K key, String query)
Description copied from interface:ReactiveGraphCommandsExecute the command GRAPH.EXPLAIN. Summary: Constructs a query execution plan but does not run it. Inspect this execution plan to better understand how your query will get executed. Group: graph- Specified by:
graphExplainin interfaceReactiveGraphCommands<K>- Parameters:
key- the key, must not benullquery- the query, must not benull- Returns:
- a uni producing the string representation of the query execution plan
-
graphList
public io.smallrye.mutiny.Uni<List<K>> graphList()
Description copied from interface:ReactiveGraphCommandsExecute the command GRAPH.LIST. Summary: Lists all graph keys in the keyspace. Group: graph- Specified by:
graphListin interfaceReactiveGraphCommands<K>- Returns:
- a uni producing the list of list of keys storing graphs
-
graphQuery
public io.smallrye.mutiny.Uni<List<Map<String,GraphQueryResponseItem>>> graphQuery(K key, String query)
Description copied from interface:ReactiveGraphCommandsExecute the command GRAPH.QUERY. Summary: Executes the given query against a specified graph. Group: graph- Specified by:
graphQueryin interfaceReactiveGraphCommands<K>- Parameters:
key- the key, must not benullquery- the query, must not benull- Returns:
- a map, potentially empty, containing the requested items to return. The map is empty if
the query does not have a
returnclause. For each request item, aGraphQueryResponseItemis returned. It can represent a scalar item (GraphQueryResponseItem.ScalarItem), a node (GraphQueryResponseItem.NodeItem, or a relation (GraphQueryResponseItem.RelationItem).
-
graphQuery
public io.smallrye.mutiny.Uni<List<Map<String,GraphQueryResponseItem>>> graphQuery(K key, String query, Duration timeout)
Description copied from interface:ReactiveGraphCommandsExecute the command GRAPH.QUERY. Summary: Executes the given query against a specified graph. Group: graph- Specified by:
graphQueryin interfaceReactiveGraphCommands<K>- Parameters:
key- the key, must not benullquery- the query, must not benulltimeout- a timeout, must not benull- Returns:
- a map, potentially empty, containing the requested items to return. The map is empty if
the query does not have a
returnclause. For each request item, aGraphQueryResponseItemis returned. It can represent a scalar item (GraphQueryResponseItem.ScalarItem), a node (GraphQueryResponseItem.NodeItem, or a relation (GraphQueryResponseItem.RelationItem).
-
decodeQueryResponse
static List<Map<String,GraphQueryResponseItem>> decodeQueryResponse(io.vertx.mutiny.redis.client.Response r)
-
-