queryMaker method
Implementation
Query<Object?> queryMaker(String mid, QueryValue value, Query<Object?> query) {
switch (value.operType) {
case OperType.isEqualTo:
return query.where(mid, isEqualTo: value.value);
case OperType.isGreaterThan:
return query.where(mid, isGreaterThan: value.value);
case OperType.isGreaterThanOrEqualTo:
return query.where(mid, isGreaterThanOrEqualTo: value.value);
case OperType.isLessThan:
return query.where(mid, isLessThan: value.value);
case OperType.isLessThanOrEqualTo:
return query.where(mid, isLessThanOrEqualTo: value.value);
case OperType.isNotEqualTo:
return query.where(mid, isNotEqualTo: value.value);
case OperType.arrayContains:
logger.finest('query=mid arrayContains ${value.value}');
return query.where(mid, arrayContains: value.value);
case OperType.arrayContainsAny:
logger.finest('query=mid arrayContainsAny ${value.value}');
return query.where(mid, arrayContainsAny: value.value);
case OperType.whereIn:
logger.finest('query=mid whereIn ${value.value}');
return query.where(mid, whereIn: value.value);
case OperType.whereNotIn:
logger.finest('query=mid whereNotIn ${value.value}');
return query.where(mid, whereNotIn: value.value);
case OperType.isNull:
logger.finest('query=mid isNull ${value.value}');
return query.where(mid, isNull: value.value);
case OperType.textSearch:
logger.severe('query=--- firebase IS NOT SUPPORT TextSearch !!! ---');
return query;
}
}