countByQuery method
Returns the number of entities that match the given query
.
Implementation
@override
Future<int> countByQuery(Query query) async {
var values = _data.entries
.where((element) =>
MapMatcher.evaluate(query.filter, element.value, system))
.map((e) => EntityIntermediate(e.key, e.value))
.map((e) => analysis.decode(e));
return Future.value(values.length);
}