Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 139833

Implementing OR in firestore query - Firebase firestore

$
0
0

I am trying implement logical OR operator in firestore query.

db.collection('users').where('company_id', '==', companyId)
                          .where('role', '==', 'Maker')
                          .where('role', '==', 'Checker')
                          .where('role', '==', 'Approver')
                          .get().then(function(adminsSnapshot){


             //Some processing on dataSnapshot
})

But this is not the right way to implement OR.

I want all users with roles of 'Maker, Checker or Approver'.

How would i implement OR in firestore query ? There's nothing in Doc.


Viewing all articles
Browse latest Browse all 139833

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>