Пример #1
0
 def as_query(self):
     if self.field_name == 'time':
         return {
             self.field_name:
             _time_to_search_dims(
                 [self.low_value.value, self.high_value.value])
         }
     else:
         return {
             self.field_name:
             Range(self.low_value.as_value(), self.high_value.as_value())
         }
Пример #2
0
 def single_date(self, date):
     return _time_to_search_dims(date)
Пример #3
0
 def date_pair(self, start, end):
     return _time_to_search_dims((start, end))
Пример #4
0
 def as_query(self):
     return {
         self.field_name:
         _time_to_search_dims([self.low_value.value, self.high_value.value])
     }