I have a joint property for querying multiple values at a time. It looks like this:
And here's my querying code:
rootRef.child("leagues")
.orderByChild("division_size")
.startAt("1_1")
.endAt("1_10")
.addListenerForSingleValueEvent(object : ValueEventListener {
override fun onDataChange(snapshot: DataSnapshot) {
if (snapshot.exists()) {
log.error("League Available")
} else {
log.error("League Not Available")
}
}
override fun onCancelled(error: DatabaseError) {
log.error("Failed to read value.", error.toException())
}
})
Notice the size in "division_size" of startAt is 1 and endAt is 10. This is giving me incorrect result, the snapshot doesn't exist when I do that but when I switch the size of endAt to 9 or any single digit then it works.
How can I make it to work on all digits, lets say from 1 to 100?