Firebase firstore - How to create a "not equal"query?

858 views
Skip to first unread message

קובי דוד

unread,
Apr 1, 2020, 4:02:13 PM4/1/20
to Firebase Google Group
Hi,

I would that each user will get all the Docs excepts those includes his userId.
How can i do that?
also can you please explain why the where() query is not available? I can use only whereEqualTo, whereGreaterThan, whereLessThan etc.

Thanks in advance,
Kobi.d

Kato Richardson

unread,
Apr 1, 2020, 4:09:31 PM4/1/20
to Firebase Google Group
Hello,

As documented here, you can use in and array-contains to create an OR query, or you can simply query for both conditions and aggregate client side. See also aggregation queries.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1cedf599-f6e7-4521-a1de-c798c709c678%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Sam Stern

unread,
Apr 1, 2020, 4:10:47 PM4/1/20
to Firebase Google Group
Hi Kobi.d,

Right now Firestore does not support "not equal" queries although that is something we have on our roadmap.  We have whereEqualTo and the other methods in order to help you find which types of queries we support.  It's much more type safe than .where('field', '==', 'value') for Java developers.

- Sam

--
Reply all
Reply to author
Forward
0 new messages