I am trying to run the below query on the sample data provided in firebase docs here:
cities.whereLessThan("population", 9000000)
.whereGreaterThan("population", 9000000)
.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if(task.isSuccessful()) {
Logger.log_error(TAG + " Task successful Result is Empty = " + task.getResult().isEmpty());
}else {
Logger.log_error(TAG + " Task failed = " + task.getException().getMessage());
}
}
});
I am expecting to get cities where the population is less than 9000000 and greater than 9000000. Eventually what I am trying to achieve is: select * from TABLE where population <> 9000000 by combining whereLessThan and whereGreaterThan in the FireStore query.
Can someone please let me know if it isn't supported at all or am I wrong somewhere?