Skip to content

Commit f229866

Browse files
committed
added toString to all the ResultSetImpl
1 parent 7967df5 commit f229866

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

src/main/java/com/redislabs/redisgraph/impl/RecordImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,10 @@ public boolean containsKey(String key) {
4343
public int size() {
4444
return this.header.size();
4545
}
46+
47+
@Override
48+
public String toString() {
49+
return this.values.toString();
50+
}
4651

4752
}

src/main/java/com/redislabs/redisgraph/impl/ResultSetImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,9 @@ public Record next() {
6363
public Statistics getStatistics() {
6464
return statistics;
6565
}
66+
67+
@Override
68+
public String toString() {
69+
return this.header + "\n" + this.results + "\n" + this.statistics;
70+
}
6671
}

src/main/java/com/redislabs/redisgraph/impl/StatisticsImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,9 @@ public int relationshipsCreated() {
6666
public int propertiesSet() {
6767
return getIntValue(Label.PROPERTIES_SET);
6868
}
69+
70+
@Override
71+
public String toString() {
72+
return getStatistics().toString();
73+
}
6974
}

src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
package com.redislabs.redisgraph;
22

3-
import java.lang.reflect.Method;
4-
53
import org.junit.Assert;
64
import org.junit.Before;
75
import org.junit.Test;
86

97
import com.redislabs.redisgraph.Statistics.Label;
108

11-
import redis.clients.jedis.Jedis;
12-
139
public class RedisGraphAPITest {
1410
RedisGraphAPI api;
1511

0 commit comments

Comments
 (0)