Fix #397

Merged
greg6775 merged 1 commit from greg-dev into master 2020-03-09 20:07:05 +01:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 304c588dbb - Show all commits

View file

@ -76,7 +76,7 @@
<dependency>
<groupId>com.rethinkdb</groupId>
<artifactId>rethinkdb-driver</artifactId>
<version>2.4.1.1</version>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>

View file

@ -53,7 +53,7 @@ public class Rethink {
private JSONArray getAsArray(String table, String where, String value) {
try {
String string = r.table(table).filter(row -> row.g(where.toLowerCase()).eq(value)).coerceTo("array").toJson().run(conn).toString();
String string = r.table(table).filter(row -> row.g(where.toLowerCase()).eq(value)).coerceTo("array").toJson().run(conn);
return new JSONArray(string);
} catch (NoSuchElementException e) {
return null;
@ -77,7 +77,7 @@ public class Rethink {
}
public JSONObject getObjectByID(String table, String id) {
String response = r.table(table).get(id).toJson().run(conn).toString();
String response = r.table(table).get(id).toJson().run(conn);
return new JSONObject(response);
}