v1.1.2 #393
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) {
|
||||
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);
|
||||
} 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);
|
||||
String response = r.table(table).get(id).toJson().run(conn).toString();
|
||||
return new JSONObject(response);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue