Class AbstractRedisGraph
- java.lang.Object
-
- com.redislabs.redisgraph.impl.api.AbstractRedisGraph
-
- All Implemented Interfaces:
RedisGraph
,Closeable
,AutoCloseable
- Direct Known Subclasses:
ContextedRedisGraph
,RedisGraph
public abstract class AbstractRedisGraph extends Object implements RedisGraph
An abstract class to handle non implementation specific user requests
-
-
Constructor Summary
Constructors Constructor Description AbstractRedisGraph()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ResultSet
callProcedure(String graphId, String procedure)
Invokes stored procedures without argumentsResultSet
callProcedure(String graphId, String procedure, List<String> args)
Invokes stored procedure with argumentsResultSet
callProcedure(String graphId, String procedure, List<String> args, Map<String,List<String>> kwargs)
Invoke a stored procedureprotected abstract redis.clients.jedis.Jedis
getConnection()
Inherited classes should return a Jedis connection, with respect to their contextResultSet
query(String graphId, String query)
Execute a Cypher query.ResultSet
query(String graphId, String query, Object... args)
Deprecated.usequery(String, String, Map)
instead.ResultSet
query(String graphId, String query, Map<String,Object> params)
Executes a cypher query with parameters.protected abstract ResultSet
sendQuery(String graphId, String preparedQuery)
Sends a query to the redis graph.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.redislabs.redisgraph.RedisGraph
close, deleteGraph
-
-
-
-
Method Detail
-
getConnection
protected abstract redis.clients.jedis.Jedis getConnection()
Inherited classes should return a Jedis connection, with respect to their context- Returns:
- Jedis connection
-
sendQuery
protected abstract ResultSet sendQuery(String graphId, String preparedQuery)
Sends a query to the redis graph. Implementation and context dependent- Parameters:
graphId
- graph to be queriedpreparedQuery
- prepared query- Returns:
- Result set
-
query
public ResultSet query(String graphId, String query)
Execute a Cypher query.- Specified by:
query
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onquery
- Cypher query- Returns:
- a result set
-
query
@Deprecated public ResultSet query(String graphId, String query, Object... args)
Deprecated.usequery(String, String, Map)
instead.Execute a Cypher query with arguments- Specified by:
query
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onquery
- Cypher queryargs
-- Returns:
- a result set
-
query
public ResultSet query(String graphId, String query, Map<String,Object> params)
Executes a cypher query with parameters.- Specified by:
query
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query on.query
- Cypher query.params
- parameters map.- Returns:
- a result set.
-
callProcedure
public ResultSet callProcedure(String graphId, String procedure)
Description copied from interface:RedisGraph
Invokes stored procedures without arguments- Specified by:
callProcedure
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onprocedure
- procedure name to invoke- Returns:
- result set with the procedure data
-
callProcedure
public ResultSet callProcedure(String graphId, String procedure, List<String> args)
Description copied from interface:RedisGraph
Invokes stored procedure with arguments- Specified by:
callProcedure
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onprocedure
- procedure name to invokeargs
- procedure arguments- Returns:
- result set with the procedure data
-
callProcedure
public ResultSet callProcedure(String graphId, String procedure, List<String> args, Map<String,List<String>> kwargs)
Description copied from interface:RedisGraph
Invoke a stored procedure- Specified by:
callProcedure
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onprocedure
- - procedure to executeargs
- - procedure argumentskwargs
- - procedure output arguments- Returns:
- result set with the procedure data
-
-