def filter(self, column: str, operator: str, criteria: str): """Either filter in or filter out based on Self.negate_next.""" if self.negate_next is True: self.negate_next = False operator = f"not.{operator}" key, val = sanitize_param(column), f"{operator}.{criteria}" if key in self.session.params: self.session.params.update( {key: self.session.params.get_list(key) + [val]}) else: self.session.params[key] = val return self
def fts(self, column: str, query: str): return self.filter(column, "fts", sanitize_param(query))
def is_(self, column: str, value: str): return self.filter(column, "is", sanitize_param(value))
def lte(self, column: str, value: str): return self.filter(column, "lte", sanitize_param(value))
def neq(self, column: str, value: str): return self.filter(column, "neq", sanitize_param(value))