i want to retrieve from firebase by email

74 views
Skip to first unread message

Fady Zarif

unread,
Jul 23, 2016, 11:04:02 AM7/23/16
to Firebase Google Group
i have list of Emails 

i want to get data of this Email from firebase
so i make 

DatabaseReference reference1 = FirebaseDatabase.getInstance().getReference("User Data");
Query query = reference1.orderByChild("Email").equalTo(?????);

so what should i do 
 i have list of emails that i want to pass to equalTo ?
how to make loop for this ?

Frank van Puffelen

unread,
Jul 27, 2016, 8:20:44 PM7/27/16
to Firebase Google Group
Hey Fady,

You cannot pass multiple items into a Firebase query. You'll instead have to run a separate query for each email address.

The network overhead for multiple calls with Firebase is a lot lower than most people expect. The Firebase client keeps an open connection to the database server. So each additional request goes over the same existing connecting. Better yet: the requests can be pipelined. For a good explanation of that (including ASCII art), see my answer here: http://stackoverflow.com/questions/35931526/speed-up-fetching-posts-for-my-social-network-app-by-using-query-instead-of-obse/35932786#35932786

    puf
Reply all
Reply to author
Forward
0 new messages