All Projects → RedisGraph → JRedisGraph

RedisGraph / JRedisGraph

Licence: BSD-3-Clause license
Java API for RedisGraph

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to JRedisGraph

redisgraph-go
A Golang client for redisgraph
Stars: ✭ 99 (+76.79%)
Mutual labels:  cypher, redisgraph
janusgraph-docker
Yet another JanusGraph, Cassandra/Scylla and Elasticsearch in Docker Compose setup
Stars: ✭ 54 (-3.57%)
Mutual labels:  cypher
cerberus-java-client
Java Client for Cerberus
Stars: ✭ 14 (-75%)
Mutual labels:  java-client
nakama-java
Android optimized Java client for Nakama server.
Stars: ✭ 26 (-53.57%)
Mutual labels:  java-client
SketchwareAPI
Sketchware API Multiplatform Library
Stars: ✭ 26 (-53.57%)
Mutual labels:  java-client
onesait-cloud-platform-clientlibraries
Client libraries to interact with Onesait Platform Cloud Side (Digital Broker specially)
Stars: ✭ 15 (-73.21%)
Mutual labels:  java-client
JRediSearch
Java Client for RediSearch
Stars: ✭ 133 (+137.5%)
Mutual labels:  java-client
angular-neo4j
Neo4j Bolt driver wrapper for Angular
Stars: ✭ 18 (-67.86%)
Mutual labels:  cypher
neo4j-faker
Use faker cypher functions to generate demo and test data with cypher
Stars: ✭ 30 (-46.43%)
Mutual labels:  cypher
grafana-api-java-client
A simple java client for interacting with Grafana using a fluent interface.
Stars: ✭ 40 (-28.57%)
Mutual labels:  java-client
redis-modules-java
Java client libraries for redis-modules https://redis.io/modules, based on Redisson. https://github.com/redisson/redisson
Stars: ✭ 57 (+1.79%)
Mutual labels:  java-client
kong-java-client
Java Client for Kong API Gateway configuration
Stars: ✭ 69 (+23.21%)
Mutual labels:  java-client
Mockserver
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and…
Stars: ✭ 3,479 (+6112.5%)
Mutual labels:  java-client
cassandra-client
Cassandra 3 GUI client
Stars: ✭ 49 (-12.5%)
Mutual labels:  java-client
redisgraph-bulk-loader
A Python utility for building RedisGraph databases from CSV inputs
Stars: ✭ 59 (+5.36%)
Mutual labels:  redisgraph
itunes-api
Java client for iTunes APIs
Stars: ✭ 32 (-42.86%)
Mutual labels:  java-client
wp-api-v2-client-java
WP-API v2 Java Client
Stars: ✭ 72 (+28.57%)
Mutual labels:  java-client
mockserver-node
Node.js module and grunt plugin to start and stop MockServer and MockServer Proxy
Stars: ✭ 34 (-39.29%)
Mutual labels:  java-client
JRedisTimeSeries
Java Client for RedisTimeSeries
Stars: ✭ 29 (-48.21%)
Mutual labels:  java-client
ocparse
LALR grammar based Cypher parser using the grammar rules from the openCypher project.
Stars: ✭ 19 (-66.07%)
Mutual labels:  cypher

license GitHub issues Maven Central Javadocs Codecov Known Vulnerabilities

JRedisGraph

Forum Discord

RedisGraph Java client

Deprecation notice

As of Jedis version 4.2.0, this library is deprecated. Its features have been merged into Jedis. Please either install it from maven or the repo.

Official Releases

  <dependencies>
    <dependency>
      <groupId>com.redislabs</groupId>
      <artifactId>jredisgraph</artifactId>
      <version>2.5.1</version>
    </dependency>
  </dependencies>

Snapshots

  <repositories>
    <repository>
      <id>snapshots-repo</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
  </repositories>

and

  <dependencies>
    <dependency>
      <groupId>com.redislabs</groupId>
      <artifactId>jredisgraph</artifactId>
      <version>2.6.0-SNAPSHOT</version>
    </dependency>
  </dependencies>

Example: Using the Java Client

package com.redislabs.redisgraph;

import com.redislabs.redisgraph.graph_entities.Edge;
import com.redislabs.redisgraph.graph_entities.Node;
import com.redislabs.redisgraph.graph_entities.Path;
import com.redislabs.redisgraph.impl.api.RedisGraph;

import java.util.List;

public class RedisGraphExample {
    public static void main(String[] args) {
        // general context api. Not bound to graph key or connection
        RedisGraph graph = new RedisGraph();

        Map<String, Object> params = new HashMap<>();
        params.put("age", 30);
        params.put("name", "amit");

        // send queries to a specific graph called "social"
        graph.query("social","CREATE (:person{name:'roi',age:32})");
        graph.query("social","CREATE (:person{name:$name,age:$age})", params);
        graph.query("social","MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(b)");

        ResultSet resultSet = graph.query("social", "MATCH (a:person)-[r:knows]->(b:person) RETURN a, r, b");
        while(resultSet.hasNext()) {
            Record record = resultSet.next();
            // get values
            Node a = record.getValue("a");
            Edge r =  record.getValue("r");

            //print record
            System.out.println(record.toString());
        }

        resultSet = graph.query("social", "MATCH p = (:person)-[:knows]->(:person) RETURN p");
        while(resultSet.hasNext()) {
            Record record = resultSet.next();
            Path p = record.getValue("p");

            // More path API at Javadoc.
            System.out.println(p.nodeCount());
        }

        // delete graph
        graph.deleteGraph("social");

        // get connection context - closable object
        try(RedisGraphContext context = graph.getContext()) {
            context.query("contextSocial","CREATE (:person{name:'roi',age:32})");
            context.query("social","CREATE (:person{name:$name,age:$age})", params);
            context.query("contextSocial", "MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(b)");
            // WATCH/MULTI/EXEC
            context.watch("contextSocial");
            RedisGraphTransaction t = context.multi();
            t.query("contextSocial", "MATCH (a:person)-[r:knows]->(b:person{name:$name,age:$age}) RETURN a, r, b", params);
            // support for Redis/Jedis native commands in transaction
            t.set("x", "1");
            t.get("x");
            // get multi/exec results
            List<Object> execResults =  t.exec();
            System.out.println(execResults.toString());

            context.deleteGraph("contextSocial");
        }
    }
}

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].