@@ -69,6 +69,7 @@ module Squeal.PostgreSQL.Expression
69 , ceiling_
69 , ceiling_
70 , greatest
70 , greatest
72 -- ** Conditions
73 -- ** Conditions
@@ -168,6 +169,13 @@ module Squeal.PostgreSQL.Expression
168 , queryTree
169 , queryTree
169 , toTSquery
170 , toTSquery
170 , toTSvector
171 , toTSvector
171 -- ** Aggregation
179 -- ** Aggregation
172 , Aggregate (..)
180 , Aggregate (..)
173 , Distinction (..)
181 , Distinction (..)
@@ -1494,30 +1502,57 @@ tsvectorLength = unsafeFunction "length"
1494numnode :: null 'PGtsquery :--> null 'PGint4
1502numnode :: null 'PGtsquery :--> null 'PGint4
1495numnode = unsafeFunction "numnode"
1503numnode = unsafeFunction "numnode"
1498− :: FunctionHet '[null 'PGtext, null 'PGtext] (null 'PGtsquery)
1505+plainToTSquery :: null 'PGtext :--> null 'PGtsquery
1499−plainToTSquery = unsafeFunctionHet "plainto_tsquery"
1506+plainToTSquery = unsafeFunction "plainto_tsquery"
1501−phraseToTSquery
1508+phraseToTSquery :: null 'PGtext :--> null 'PGtsquery
1502− :: FunctionHet '[null 'PGtext, null 'PGtext] (null 'PGtsquery)
1503−phraseToTSquery = unsafeFunctionHet "phraseto_tsquery"
1509+phraseToTSquery = unsafeFunction "phraseto_tsquery"
1505−websearchToTSquery
1511+websearchToTSquery :: null 'PGtext :--> null 'PGtsquery
1506− :: FunctionHet '[null 'PGtext, null 'PGtext] (null 'PGtsquery)
1507−websearchToTSquery = unsafeFunctionHet "websearch_to_tsquery"
1512+websearchToTSquery = unsafeFunction "websearch_to_tsquery"
1509queryTree :: null 'PGtsquery :--> null 'PGtext
1514queryTree :: null 'PGtsquery :--> null 'PGtext
1510queryTree = unsafeFunction "query_tree"
1515queryTree = unsafeFunction "query_tree"
1513− :: FunctionHet '[null 'PGtext, null 'PGtext] (null 'PGtsquery)
1517+toTSquery :: null 'PGtext :--> null 'PGtsquery
1514−toTSquery = unsafeFunctionHet "to_tsquery"
1518+toTSquery = unsafeFunction "to_tsquery"
1516toTSvector
1520toTSvector
1517 :: ty `In` '[ 'PGtext, 'PGjson, 'PGjsonb]
1521 :: ty `In` '[ 'PGtext, 'PGjson, 'PGjsonb]
1518− => FunctionHet '[null 'PGtext, null ty] (null 'PGtsquery)
1522+ => null ty :--> null 'PGtsquery
1519−toTSvector = unsafeFunctionHet "to_tsvector"
1523+toTSvector = unsafeFunction "to_tsvector"
1526+ :: FunctionHet '[null 'PGtsvector, null ('PGchar 1)] (null 'PGtsvector)
1527+setWeight = unsafeFunctionHet "set_weight"
1529+litChar :: Char -> Expr (null ('PGchar 1))
1530+litChar chr = UnsafeExpression $
1531+ "E\'" <> fromString (escape =<< [chr]) <> "\'"
1533+strip :: null 'PGtsvector :--> null 'PGtsvector
1534+strip = unsafeFunction "strip"
1536+jsonToTSvector :: FunctionHet '[null 'PGjson, null 'PGjson] (null 'PGtsvector)
1537+jsonToTSvector = unsafeFunctionHet "json_to_tsvector"
1539+jsonbToTSvector :: FunctionHet '[null 'PGjsonb, null 'PGjsonb] (null 'PGtsvector)
1540+jsonbToTSvector = unsafeFunctionHet "jsonb_to_tsvector"
1542+tsDelete :: FunctionHet
1543+ '[null 'PGtsvector, null ('PGvararray ('NotNull 'PGtext))]
1545+tsDelete = unsafeFunctionHet "ts_delete"
1547+tsFilter :: FunctionHet
1548+ '[null 'PGtsvector, null ('PGvararray ('NotNull ('PGchar 1)))]
1550+tsFilter = unsafeFunctionHet "ts_filter"
1553+ :: document `In` '[ 'PGtext, 'PGjson, 'PGjsonb]
1554+ => FunctionHet '[null document, null 'PGtsquery] (null 'PGtext)
1555+tsHeadline = unsafeFunctionHet "ts_headline"
1521{-----------------------------------------
1556{-----------------------------------------
1522aggregation
1557aggregation
1523-----------------------------------------}
1558-----------------------------------------}