Skip to content

Commit

Permalink
Update README.md (#62)
Browse files Browse the repository at this point in the history
* Update README.md

* version bump
fixed README.md
  • Loading branch information
DvirDukhan authored Mar 11, 2020
1 parent 9a64906 commit 7a8552d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,12 @@ RedisGraph Java client
<dependency>
<groupId>com.redislabs</groupId>
<artifactId>jredisgraph</artifactId>
<version>1.0.6</version>
</dependency>
</dependencies>

Or

<dependencies>
<dependency>
<groupId>com.redislabs</groupId>
<artifactId>jredisgraph</artifactId>
<version>2.0.0-rc3</version>
<version>2.0.0</version>
</dependency>
</dependencies>
```

### Snapshots
To be used with RedisGraph 2.0 (not officially released)

```xml
<repositories>
<repository>
Expand All @@ -54,38 +42,12 @@ and
<dependency>
<groupId>com.redislabs</groupId>
<artifactId>jredisgraph</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
```

# Example: Using the Java Client
## Up to 2.0.0
```java
package com.redislabs.redisgraph;

public class RedisGraphExample {
public static void main(String[] args) {

RedisGraphAPI api = new RedisGraphAPI("social");

api.query("CREATE (:person{name:'roi',age:32})");
api.query("CREATE (:person{name:%s,age:%d})", "amit", 30);

api.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(b)");

ResultSet resultSet = api.query("MATCH (a:person)-[:knows]->(b:person) RETURN a, b");

while(resultSet.hasNext()){
Record record = resultSet.next();
System.out.println(record.getString("a.name"));
}
}
}

```
## From 2.0.0

```java
package com.redislabs.redisgraph;

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.redislabs</groupId>
<artifactId>jredisgraph</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>

<name>JRedisGraph</name>
<description>Official client for Redis-Graph</description>
Expand Down

0 comments on commit 7a8552d

Please sign in to comment.