def _get_filters(obj, history_table): query = get_input_dict() where = [False, False] where = [getattr(history_table, f) == query.get(f) for f in query] where.append(history_table.data_version != null()) if hasattr(history_table, 'product'): where.append(history_table.product != null()) if request.args.get('timestamp_from'): where.append(history_table.timestamp >= int(request.args.get('timestamp_from'))) if request.args.get('timestamp_to'): where.append(history_table.timestamp <= int(request.args.get('timestamp_to'))) return where
def _get_filters(self): query = get_input_dict() where = [getattr(self.table.history, f) == query.get(f) for f in query] where.append(self.table.history.data_version != null()) if hasattr(self.history_table, 'product'): where.append(self.history_table.product != null()) request = connexion.request if request.args.get('timestamp_from'): where.append(self.history_table.timestamp >= int(request.args.get('timestamp_from'))) if request.args.get('timestamp_to'): where.append(self.history_table.timestamp <= int(request.args.get('timestamp_to'))) return where
def _get_filters_all(self, obj): query = get_input_dict() where = [False, False] where = [getattr(self.history_table, f) == query.get(f) for f in query] where.append(self.history_table.data_version != null()) request = connexion.request if hasattr(self.history_table, 'product' or ' channel'): if request.args.get('product'): where.append(self.history_table.base_product == request.args.get('product')) if request.args.get('channel'): where.append(self.history_table.base_channel == request.args.get('channel')) if request.args.get('timestamp_from'): where.append(self.history_table.timestamp >= int(request.args.get('timestamp_from'))) if request.args.get('timestamp_to'): where.append(self.history_table.timestamp <= int(request.args.get('timestamp_to'))) return where
def _get_filters_all(self, obj): query = get_input_dict() where = [False, False] where = [getattr(self.history_table, f) == query.get(f) for f in query] where.append(self.history_table.data_version != null()) request = connexion.request if hasattr(self.history_table, "product" or " channel"): if request.args.get("product"): where.append(self.history_table.base_product == request.args.get("product")) if request.args.get("channel"): where.append(self.history_table.base_channel == request.args.get("channel")) if request.args.get("timestamp_from"): where.append(self.history_table.timestamp >= int(request.args.get("timestamp_from"))) if request.args.get("timestamp_to"): where.append(self.history_table.timestamp <= int(request.args.get("timestamp_to"))) return where
def _get_filters(obj, history_table): query = get_input_dict() where = [False, False] where = [getattr(history_table, f) == query.get(f) for f in query] where.append(history_table.data_version != null()) if hasattr(history_table, "product"): where.append(history_table.product != null()) if request.args.get("product"): where.append(history_table.product == request.args.get("product")) if hasattr(history_table, "channel"): where.append(history_table.channel != null()) if request.args.get("channel"): where.append(history_table.channel == request.args.get("channel")) if request.args.get("timestamp_from"): where.append( history_table.timestamp >= int(request.args.get("timestamp_from"))) if request.args.get("timestamp_to"): where.append( history_table.timestamp <= int(request.args.get("timestamp_to"))) return where
def _get_filters(self): query = get_input_dict() where = [getattr(self.table.history, f) == query.get(f) for f in query] where.append(self.table.history.data_version != null()) request = connexion.request if hasattr(self.history_table, 'channel'): if request.args.get('channel'): where.append( self.history_table.channel == request.args.get('channel')) if hasattr(self.history_table, 'product'): where.append(self.history_table.product != null()) if request.args.get('product'): where.append( self.history_table.product == request.args.get('product')) if request.args.get('timestamp_from'): where.append(self.history_table.timestamp >= int( request.args.get('timestamp_from'))) if request.args.get('timestamp_to'): where.append(self.history_table.timestamp <= int( request.args.get('timestamp_to'))) return where