Adds spec for @@ operator and implements it in PgQuery

This commit is contained in:
Diogo Biazus
2015-05-22 12:28:26 -04:00
parent 4277284a69
commit a980db6d2d
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -175,6 +175,7 @@ wherePred (col, predicate) =
"like" -> unknownLiteral $ T.map star value
"ilike" -> unknownLiteral $ T.map star value
"in" -> "(" <> T.intercalate ", " (map unknownLiteral $ T.split (==',') value) <> ") "
"@@" -> "to_tsquery(" <> unknownLiteral value <> ") "
_ -> unknownLiteral value
op = case opCode of
@@ -189,6 +190,7 @@ wherePred (col, predicate) =
"in" -> "in"
"is" -> "is"
"isnot" -> "is not"
"@@" -> "@@"
_ -> "="
orderParse :: Net.Query -> [OrderTerm]