Skip to content

Commit eb5c205

Browse files
authored
Merge pull request #2 from gkorland/master
Initial support for RedisGraph 1.0.0
2 parents 387a944 + 4b93e98 commit eb5c205

File tree

16 files changed

+457
-756
lines changed

16 files changed

+457
-756
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Compiled class file
22
*.class
3+
/bin/
4+
/target/
5+
/test-output/
6+
37

48
# Log file
59
*.log
@@ -20,3 +24,7 @@
2024

2125
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2226
hs_err_pid*
27+
28+
#eclispe
29+
.classpath
30+
.project

.idea/libraries/Maven__redis_clients_jedis_3_0_0.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

pom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
<version>1.0.0</version>
1010
<dependencies>
1111
<dependency>
12-
<groupId>org.testng</groupId>
13-
<artifactId>testng</artifactId>
14-
<version>6.8</version>
12+
<groupId>junit</groupId>
13+
<artifactId>junit</artifactId>
14+
<version>4.12</version>
15+
<scope>test</scope>
1516
</dependency>
16-
17-
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
1817
<dependency>
1918
<groupId>org.apache.commons</groupId>
2019
<artifactId>commons-pool2</artifactId>

src/main/java/com/redislabs/redisgraph/Client.java

Lines changed: 0 additions & 231 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.redislabs.redisgraph;
2+
import redis.clients.jedis.util.SafeEncoder;
3+
import redis.clients.jedis.commands.ProtocolCommand;
4+
5+
/**
6+
*
7+
*
8+
*
9+
*/
10+
public enum Command implements ProtocolCommand {
11+
QUERY("graph.QUERY");
12+
13+
private final byte[] raw;
14+
15+
Command(String alt) {
16+
raw = SafeEncoder.encode(alt);
17+
}
18+
19+
public byte[] getRaw() {
20+
return raw;
21+
}
22+
}

src/main/java/com/redislabs/redisgraph/Commands.java

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package com.redislabs.redisgraph;
2+
3+
import java.util.List;
4+
5+
/**
6+
* Container for RedisGraph result values.
7+
*
8+
* List records are returned from RedisGraph statement execution, contained within a ResultSet.
9+
*/
10+
public interface Record {
11+
12+
/**
13+
* The value at the given field index (represented as String)
14+
*
15+
* @param index
16+
* @return
17+
*/
18+
String getString(int index);
19+
20+
/**
21+
* The value at the given field (represented as String)
22+
*
23+
* @param key
24+
* @return
25+
*/
26+
String getString(String key);
27+
28+
/**
29+
* The keys of the record
30+
*
31+
* @return
32+
*/
33+
List<String> keys();
34+
35+
/**
36+
* The values of the record
37+
*
38+
* @return
39+
*/
40+
List<String> values();
41+
42+
/**
43+
* Check if the keys contain the given key
44+
*
45+
* @param key
46+
* @return
47+
*/
48+
boolean containsKey(String key);
49+
50+
/**
51+
* The number of fields in this record
52+
*
53+
* @return
54+
*/
55+
int size();
56+
}

0 commit comments

Comments
 (0)