diff --git a/dataset/table.py b/dataset/table.py index 9e1aab0..0b817ef 100644 --- a/dataset/table.py +++ b/dataset/table.py @@ -390,6 +390,10 @@ class Table(object): return self.table.c[column].like(value) if op in ("ilike",): return self.table.c[column].ilike(value) + if op in ("notlike",): + return self.table.c[column].notlike(value) + if op in ("notilike",): + return self.table.c[column].notilike(value) if op in (">", "gt"): return self.table.c[column] > value if op in ("<", "lt"): @@ -404,6 +408,8 @@ class Table(object): return self.table.c[column] != value if op in ("in",): return self.table.c[column].in_(value) + if op in ("notin",): + return self.table.c[column].notin_(value) if op in ("between", ".."): start, end = value return self.table.c[column].between(start, end) diff --git a/docs/queries.rst b/docs/queries.rst index 40b6978..2d25e93 100644 --- a/docs/queries.rst +++ b/docs/queries.rst @@ -34,7 +34,9 @@ gte, >= Greater or equal lte, <= Less or equal !=, <>, not Not equal to a single value in Value is in the given sequence +notin Value is not in the given sequence like, ilike Text search, ILIKE is case-insensitive. Use ``%`` as a wildcard +notlike Like text search, except check if pattern does not exist between, .. Value is between two values in the given tuple startswith String starts with endswith String ends with