{-# LANGUAGE
DataKinds
, OverloadedStrings
, TypeOperators
#-}
module Squeal.PostgreSQL.Expression.TextSearch
(
(@@)
, (.&)
, (.|)
, (.!)
, (<->)
, arrayToTSvector
, tsvectorLength
, numnode
, plainToTSquery
, phraseToTSquery
, websearchToTSquery
, queryTree
, toTSquery
, toTSvector
, setWeight
, strip
, jsonToTSvector
, jsonbToTSvector
, tsDelete
, tsFilter
, tsHeadline
) where
import Squeal.PostgreSQL.Expression
import Squeal.PostgreSQL.Type.List
import Squeal.PostgreSQL.Type.Schema
(@@) :: Operator (null 'PGtsvector) (null 'PGtsquery) ('Null 'PGbool)
@@ :: forall (null :: PGType -> NullType).
Operator (null 'PGtsvector) (null 'PGtsquery) ('Null 'PGbool)
(@@) = forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@@"
(.&) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
.& :: forall (null :: PGType -> NullType).
Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
(.&) = forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"&&"
(.|) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
.| :: forall (null :: PGType -> NullType).
Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
(.|) = forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"||"
(.!) :: null 'PGtsquery --> null 'PGtsquery
.! :: forall (null :: PGType -> NullType).
null 'PGtsquery --> null 'PGtsquery
(.!) = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeLeftOp ByteString
"!!"
(<->) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
<-> :: forall (null :: PGType -> NullType).
Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
(<->) = forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"<->"
arrayToTSvector
:: null ('PGvararray ('NotNull 'PGtext))
--> null 'PGtsvector
arrayToTSvector :: forall (null :: PGType -> NullType).
null ('PGvararray ('NotNull 'PGtext)) --> null 'PGtsvector
arrayToTSvector = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"array_to_tsvector"
tsvectorLength :: null 'PGtsvector --> null 'PGint4
tsvectorLength :: forall (null :: PGType -> NullType).
null 'PGtsvector --> null 'PGint4
tsvectorLength = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"length"
numnode :: null 'PGtsquery --> null 'PGint4
numnode :: forall (null :: PGType -> NullType).
null 'PGtsquery --> null 'PGint4
numnode = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"numnode"
plainToTSquery :: null 'PGtext --> null 'PGtsquery
plainToTSquery :: forall (null :: PGType -> NullType).
null 'PGtext --> null 'PGtsquery
plainToTSquery = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"plainto_tsquery"
phraseToTSquery :: null 'PGtext --> null 'PGtsquery
phraseToTSquery :: forall (null :: PGType -> NullType).
null 'PGtext --> null 'PGtsquery
phraseToTSquery = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"phraseto_tsquery"
websearchToTSquery :: null 'PGtext --> null 'PGtsquery
websearchToTSquery :: forall (null :: PGType -> NullType).
null 'PGtext --> null 'PGtsquery
websearchToTSquery = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"websearch_to_tsquery"
queryTree :: null 'PGtsquery --> null 'PGtext
queryTree :: forall (null :: PGType -> NullType).
null 'PGtsquery --> null 'PGtext
queryTree = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"query_tree"
toTSquery :: null 'PGtext --> null 'PGtsquery
toTSquery :: forall (null :: PGType -> NullType).
null 'PGtext --> null 'PGtsquery
toTSquery = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"to_tsquery"
toTSvector
:: ty `In` '[ 'PGtext, 'PGjson, 'PGjsonb]
=> null ty --> null 'PGtsvector
toTSvector :: forall (ty :: PGType) (null :: PGType -> NullType).
In ty '[ 'PGtext, 'PGjson, 'PGjsonb] =>
null ty --> null 'PGtsvector
toTSvector = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"to_tsvector"
setWeight :: '[null 'PGtsvector, null ('PGchar 1)] ---> null 'PGtsvector
setWeight :: forall (null :: PGType -> NullType).
'[null 'PGtsvector, null ('PGchar 1)] ---> null 'PGtsvector
setWeight = forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"set_weight"
strip :: null 'PGtsvector --> null 'PGtsvector
strip :: forall (null :: PGType -> NullType).
null 'PGtsvector --> null 'PGtsvector
strip = forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"strip"
jsonToTSvector :: '[null 'PGjson, null 'PGjson] ---> null 'PGtsvector
jsonToTSvector :: forall (null :: PGType -> NullType).
'[null 'PGjson, null 'PGjson] ---> null 'PGtsvector
jsonToTSvector = forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"json_to_tsvector"
jsonbToTSvector :: '[null 'PGjsonb, null 'PGjsonb] ---> null 'PGtsvector
jsonbToTSvector :: forall (null :: PGType -> NullType).
'[null 'PGjsonb, null 'PGjsonb] ---> null 'PGtsvector
jsonbToTSvector = forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"jsonb_to_tsvector"
tsDelete ::
'[null 'PGtsvector, null ('PGvararray ('NotNull 'PGtext))]
---> null 'PGtsvector
tsDelete :: forall (null :: PGType -> NullType).
'[null 'PGtsvector, null ('PGvararray ('NotNull 'PGtext))]
---> null 'PGtsvector
tsDelete = forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"ts_delete"
tsFilter ::
'[null 'PGtsvector, null ('PGvararray ('NotNull ('PGchar 1)))]
---> null 'PGtsvector
tsFilter :: forall (null :: PGType -> NullType).
'[null 'PGtsvector, null ('PGvararray ('NotNull ('PGchar 1)))]
---> null 'PGtsvector
tsFilter = forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"ts_filter"
tsHeadline
:: document `In` '[ 'PGtext, 'PGjson, 'PGjsonb]
=> '[null document, null 'PGtsquery] ---> null 'PGtext
tsHeadline :: forall (document :: PGType) (null :: PGType -> NullType).
In document '[ 'PGtext, 'PGjson, 'PGjsonb] =>
'[null document, null 'PGtsquery] ---> null 'PGtext
tsHeadline = forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"ts_headline"