and static method

Performs a logical AND operation on an array of one or more queries.

Implementation

static ConversationQuery and(
  List<ConversationQuery> queries,
) {
  if (queries.length < 1) {
    throw ArgumentError.notNull(
      'queries',
    );
  }
  ConversationQuery compositionQuery = ConversationQuery._from(
    client: queries.first.client,
  );
  for (var query in queries) {
    if (query.client != compositionQuery.client) {
      throw ArgumentError(
        'ConversationQuery.client inconsistency',
      );
    }
    compositionQuery.condition.add(query.condition);
  }
  return compositionQuery;
}