[android][database] Fix startAt and endAt

This commit is contained in:
Chris Bianca 2017-05-02 13:56:50 +01:00
parent 9adeffef18
commit 7c9b094f54
1 changed files with 12 additions and 12 deletions

View File

@ -249,46 +249,46 @@ public class RNFirebaseDatabaseReference {
if ("number".equals(valueType)) {
double value = (Double) modifier.get("value");
if (key == null) {
query = query.equalTo(value);
query = query.endAt(value);
} else {
query = query.equalTo(value, key);
query = query.endAt(value, key);
}
} else if ("boolean".equals(valueType)) {
boolean value = (Boolean) modifier.get("value");
if (key == null) {
query = query.equalTo(value);
query = query.endAt(value);
} else {
query = query.equalTo(value, key);
query = query.endAt(value, key);
}
} else if ("string".equals(valueType)) {
String value = (String) modifier.get("value");
if (key == null) {
query = query.equalTo(value);
query = query.endAt(value);
} else {
query = query.equalTo(value, key);
query = query.endAt(value, key);
}
}
} else if ("startAt".equals(name)) {
if ("number".equals(valueType)) {
double value = (Double) modifier.get("value");
if (key == null) {
query = query.equalTo(value);
query = query.startAt(value);
} else {
query = query.equalTo(value, key);
query = query.startAt(value, key);
}
} else if ("boolean".equals(valueType)) {
boolean value = (Boolean) modifier.get("value");
if (key == null) {
query = query.equalTo(value);
query = query.startAt(value);
} else {
query = query.equalTo(value, key);
query = query.startAt(value, key);
}
} else if ("string".equals(valueType)) {
String value = (String) modifier.get("value");
if (key == null) {
query = query.equalTo(value);
query = query.startAt(value);
} else {
query = query.equalTo(value, key);
query = query.startAt(value, key);
}
}
}