From f16e2e3ee5001323b750f90a8274e3bf3f106841 Mon Sep 17 00:00:00 2001 From: Richard Allaway Date: Fri, 7 Aug 2015 10:19:01 -0400 Subject: [PATCH] adds 'not in' query --- src/PostgREST/PgQuery.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PostgREST/PgQuery.hs b/src/PostgREST/PgQuery.hs index c84c1fab3..c5cda4ede 100644 --- a/src/PostgREST/PgQuery.hs +++ b/src/PostgREST/PgQuery.hs @@ -192,6 +192,7 @@ wherePred table (col, predicate) = "like" -> unknownLiteral $ T.map star value "ilike" -> unknownLiteral $ T.map star value "in" -> "(" <> T.intercalate ", " (map unknownLiteral $ T.split (==',') value) <> ") " + "notin" -> "(" <> T.intercalate ", " (map unknownLiteral $ T.split (==',') value) <> ") " "@@" -> "to_tsquery(" <> unknownLiteral value <> ") " _ -> unknownLiteral value @@ -205,6 +206,7 @@ wherePred table (col, predicate) = "like"-> "like" "ilike"-> "ilike" "in" -> "in" + "notin" -> "not in" "is" -> "is" "isnot" -> "is not" "@@" -> "@@"