where method
Creates and returns a new Filter{@link Filter}, which can be
applied to Query.where(){@link Query#where}, Filter.or()
{@link Filter#or},
or Filter.and()
{@link Filter#and}. When applied to a Query{@link Query}
it requires that documents must contain the specified field and that its value should
satisfy the relation constraint provided.
Returns a new Filter that can be used to constrain the value of a Document property.
@param {string|FieldPath} fieldPath The name of a property value to compare. @param {string} opStr A comparison operation in the form of a string (e.g., "<"). @param {*} value The value to which to compare the field for inclusion in a query. @returns {Filter} The created Filter.
@example
let collectionRef = firestore.collection('col');
collectionRef.where(Filter.where('foo', '==', 'bar')).get().then(querySnapshot => {
querySnapshot.forEach(documentSnapshot => {
console.log(`Found document at ${documentSnapshot.ref.path}`);
});
});
Implementation
external Filter where(JSAny fieldPath, String opStr, JSAny value);