我正在根据用户提供的输入从Firebase数据库中检索数据。这是特定的代码:
private void firebaseUserSearch(String searchquery) {
Query firebaseSearchQuery = mdatabaseref.orderByChild("name").startAt(searchquery).endAt(searchquery+"\uf8ff");
FirebaseRecyclerAdapter<SearchUsers,usersViewHolder > firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<SearchUsers, usersViewHolder>(
SearchUsers.class,
R.layout.list_layout,
usersViewHolder.class,
firebaseSearchQuery
) {
@Override
protected void populateViewHolder(usersViewHolder viewHolder, SearchUsers model, int position) {
viewHolder.setDetails(model.getFirstname(), model.getLastname());
}
};
mResultList.setAdapter(firebaseRecyclerAdapter);
}
问题是该方法区分大小写。但是我想检索数据,而不管用户给出的是小写字母还是大写字母。 如何实现?