Class AbstractRedisGraph

    • Constructor Detail

      • AbstractRedisGraph

        public AbstractRedisGraph()
    • 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 queried
        preparedQuery - prepared query
        Returns:
        Result set
      • query

        public ResultSet query​(String graphId,
                               String query)
        Execute a Cypher query.
        Specified by:
        query in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        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 interface RedisGraph
        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 interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        procedure - 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 interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        procedure - procedure name to invoke
        args - 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 interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        procedure - - procedure to execute
        args - - procedure arguments
        kwargs - - procedure output arguments
        Returns:
        result set with the procedure data