exec method

Future<List<RxDocument<RxDocType>>> exec()

Implementation

Future<List<RxDocument<RxDocType>>> exec() async {
  List<dynamic> result = await collection.database.engine.evaluate(
      "process.db['" +
          collection.name +
          "'].find(" +
          jsonEncode(query) +
          ").exec().then(docs => docs.map(d => d.toJSON(true)));");

  var ret = result.map((docData) {
    var doc = collection.docCache.getByDocData(docData);
    return doc;
  }).toList();

  return ret;
}