and<T extends LCObject> static method
Constructs a LCQuery that is the AND of the passed in queries
.
Implementation
static LCQuery<T> and<T extends LCObject>(Iterable<LCQuery<T>> queries) {
LCQuery<T> compositionQuery = new LCQuery<T>(null);
String? className;
queries.forEach((item) {
if (className != null && className != item.className) {
throw ('All of the queries in an or query must be on the same class.');
}
className = item.className;
compositionQuery.condition.add(item.condition);
});
compositionQuery.className = className;
return compositionQuery;
}