I see having mulitple where
acts like AND
, but how about OR
?
相关问题
- Firebase security rules difference between get() a
- Firebase firestore not working with Angular Univer
- Firestore limit writing access per time
- MappedListIterable is not a SubType
- How to use arrayUnion with AngularFirestore?
相关文章
- Firestore Update a document field Using Rest API
- How to combine Firestore orderBy desc with startAf
- How does Cassandra scale horizontally ?
- Modelling a Chat like Application in Firebase
- Firestore + cloud functions: How to read from anot
- Checking if a document exists in a Firestore colle
- NoSQL Injection? (PHP->phpcassa->Cassandra)
- Flutter how to use Future return value as if varia
You can't really do an OR query in Cloud Firestore.
As a workaround, you could run two separate queries and merge them together on the client, or add some custom field that would essentially perform the "OR" query for you on the database. (For an example of that latter one, if you know you're going to often run an "age > 65 OR age < 18" query on the database, you could create a specific
age_high_or_low
field that you would set to true if the age field were greater than 65 or less then 18.)