def prepare(self): results = mongo_data.find({}, {"sparse_500": 1, "_id": 0}) for index, result in enumerate(results): try: self.arguments.append(result['sparse_500']) except KeyError: continue else: break
def db_command(self): return mongo_data.find( {"$or": [{"sparse_110": {"$exists": True}}, {"sparse_229": {"$exists": True}}]}, ["sparse_110", "sparse_919"])
def db_command(self): return mongo_data.find({}, ["nested_obj.str", "nested_obj.num"])
def db_command(self): return mongo_data.find({}, ["str1", "num"])
def db_command(self): return mongo_data.find({"deep_nested_obj.level_2.level_3.level_4.level_5.level_6.level_7.level_8.deep_str_agg": self.arguments[0]})
def db_command(self): return mongo_data.find({"sparse_500": self.arguments[0]})
def db_command(self): return mongo_data.find({"nested_arr": self.arguments[0]})
def db_command(self): #Select 0.1% of data. 1000 rows in this case. return mongo_data.find({"$and": [{"dyn1": {"$gte": self.arguments[0]}}, {"dyn1": {"$lt": self.arguments[1]}}]})
def db_command(self): return mongo_data.find({"str1": "{}".format(self.arguments[0])})