and method
Creates and returns a new Filter{@link Filter} that is a conjunction of the given {@link Filter}s. A conjunction filter includes a document if it satisfies all of the given {@link Filter}s.
The returned Filter 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 satisfy
one of the provided {@link Filter}s.
@param {...Filter} filters Optional. The {@link Filter}s for OR operation. These must be created with calls to {@link Filter#where}, {@link Filter#or}, or {@link Filter#and}. @returns {Filter} The created {@link Filter}.
@example
let collectionRef = firestore.collection('col');
// doc.foo == 'bar' && doc.baz > 0
let orFilter = Filter.and(Filter.where('foo', '==', 'bar'), Filter.where('baz', '>', 0));
collectionRef.where(orFilter).get().then(querySnapshot => {
querySnapshot.forEach(documentSnapshot => {
console.log(`Found document at ${documentSnapshot.ref.path}`);
});
});
Implementation
external Filter and(JSArray<Filter> filters);