def Query(self, filter_string="", filter_obj=None, subjects=None, limit=100):
    if filter_obj is None and filter_string:
      # Parse the query string
      ast = AFF4QueryParser(filter_string).Parse()

      # Query our own data store
      filter_obj = ast.Compile(data_store.DB.filter)

    subjects = []
    result_set = data_store.DB.Query([], filter_obj, subjects=subjects,
                                     limit=limit, token=self.token)
    for match in result_set:
      subjects.append(match["subject"][0][0])

    # Open them all at once.
    result = data_store.ResultSet(FACTORY.MultiOpen(subjects, token=self.token))
    result.total_count = result_set.total_count

    return result
Execute the reaction state
dataset/ETHPy150Open google/grr/grr/lib/aff4.py/AFF4Root.Query--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/reactor.py/Reactor.call_reactions