Пример #1
0
 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
Пример #2
0
 def db_command(self):
     return mongo_data.find(
         {"$or": [{"sparse_110": {"$exists": True}},
                     {"sparse_229": {"$exists": True}}]},
         ["sparse_110", "sparse_919"])
Пример #3
0
 def db_command(self):
     return mongo_data.find({}, ["nested_obj.str", "nested_obj.num"])
Пример #4
0
 def db_command(self):
     return mongo_data.find({}, ["str1", "num"])
Пример #5
0
 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]})
Пример #6
0
 def db_command(self):
     return mongo_data.find({"sparse_500": self.arguments[0]})
Пример #7
0
 def db_command(self):
     return mongo_data.find({"nested_arr": self.arguments[0]})
Пример #8
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]}}]})
Пример #9
0
 def db_command(self):
     return mongo_data.find({"str1": "{}".format(self.arguments[0])})