fetch method

CollectionQL fetch(
  1. Filter filter, {
  2. bool inplace = true,
})

Implementation

CollectionQL fetch(Filter filter, {bool inplace = true}) {
  return CollectionQL(
    super
      .where((doc) => filter.apply(doc))
      .map((doc) => inplace ? doc : Document(doc.toJsonMap()))
      .toList()
  );
}