Fix
This commit is contained in:
parent
4484231a8c
commit
6489ad6cc5
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
String string = r.table(table).filter(row -> row.g(where.toLowerCase()).eq(value)).coerceTo("array").toJson().run(conn).toString();
|
||||||
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);
|
String response = r.table(table).get(id).toJson().run(conn).toString();
|
||||||
return new JSONObject(response);
|
return new JSONObject(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue