Merge pull request #397 from BigBotNetwork/greg-dev

Fix
This commit is contained in:
Skidder 2020-03-09 20:07:04 +01:00 committed by GitHub
commit ae815985fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -53,7 +53,7 @@ public class Rethink {
private JSONArray getAsArray(String table, String where, String value) { private JSONArray getAsArray(String table, String where, String value) {
try { 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); return new JSONArray(string);
} catch (NoSuchElementException e) { } catch (NoSuchElementException e) {
return null; return null;
@ -77,7 +77,7 @@ public class Rethink {
} }
public JSONObject getObjectByID(String table, String id) { 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); return new JSONObject(response);
} }