File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 1- Java client for RedisGraph
1+ # JRedisGraph
2+ RedisGraph Java client
3+
4+
5+ # Example: Using the Java Client
6+
7+ ``` java
8+ package com.redislabs.redisgraph ;
9+
10+ public class RedisGraphExample {
11+ public static void main (String [] args ) {
12+
13+ RedisGraphAPI api = new RedisGraphAPI (" social" );
14+
15+ api. query(" CREATE (:person{name:'roi',age:32})" );
16+ api. query(" CREATE (:person{name:'amit',age:30})" );
17+
18+ api. query(" MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[knows]->(a)" );
19+
20+ ResultSet resultSet = api. query(" MATCH (a:person)-[knows]->(:person) RETURN a" );
21+
22+ while (resultSet. hasNext()){
23+ Record record = resultSet. next();
24+ System . out. println(record. getString(" a.name" ));
25+ }
26+ }
27+ }
28+
29+ ```
You can’t perform that action at this time.
0 commit comments