{-# LANGUAGE
DataKinds
, DeriveGeneric
, DerivingStrategies
, FlexibleInstances
, GeneralizedNewtypeDeriving
, MultiParamTypeClasses
, OverloadedStrings
, PolyKinds
, TypeFamilies
, TypeOperators
, TypeSynonymInstances
, UndecidableInstances
#-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Squeal.PostgreSQL.LTree
(
createLTree
, LTree(..), LQuery(..), LTxtQuery(..)
, PGltree, PGlquery, PGltxtquery
, ltree, lquery, ltxtquery
, subltree, subpath, subpathEnd
, nlevel, indexLTree, indexOffset
, text2ltree, ltree2text, lca
, (%~), (~%), (%?), (?%), (%@), (@%)
, (@>%), (%<@), (<@%), (%@>)
, (&~), (~&), (&?), (?&), (&@), (@&)
, (?@>), (?<@), (?~), (?@)
) where
import Control.Exception hiding (TypeError)
import Control.Monad.Reader
import Data.String
import Data.Text
import GHC.Generics
import GHC.TypeLits (ErrorMessage(Text), TypeError)
import Squeal.PostgreSQL
import Squeal.PostgreSQL.Render
import qualified Database.PostgreSQL.LibPQ as LibPQ
import qualified Generics.SOP as SOP
import qualified PostgreSQL.Binary.Decoding as Decoding
import qualified PostgreSQL.Binary.Encoding as Encoding
type PGltree = 'UnsafePGType "ltree"
type PGlquery = 'UnsafePGType "lquery"
type PGltxtquery = 'UnsafePGType "ltxtquery"
createLTree :: Definition db db
createLTree :: Definition db db
createLTree = ByteString -> Definition db db
forall (db0 :: SchemasType) (db1 :: SchemasType).
ByteString -> Definition db0 db1
UnsafeDefinition ByteString
"CREATE EXTENSION \"ltree\";"
ltree :: TypeExpression db (null PGltree)
ltree :: TypeExpression db (null PGltree)
ltree = ByteString -> TypeExpression db (null PGltree)
forall (db :: SchemasType) (ty :: NullType).
ByteString -> TypeExpression db ty
UnsafeTypeExpression ByteString
"ltree"
lquery :: TypeExpression db (null PGlquery)
lquery :: TypeExpression db (null PGlquery)
lquery = ByteString -> TypeExpression db (null PGlquery)
forall (db :: SchemasType) (ty :: NullType).
ByteString -> TypeExpression db ty
UnsafeTypeExpression ByteString
"lquery"
ltxtquery :: TypeExpression db (null PGltxtquery)
ltxtquery :: TypeExpression db (null PGltxtquery)
ltxtquery = ByteString -> TypeExpression db (null PGltxtquery)
forall (db :: SchemasType) (ty :: NullType).
ByteString -> TypeExpression db ty
UnsafeTypeExpression ByteString
"ltxtquery"
instance PGTyped db PGltree where pgtype :: TypeExpression db (null PGltree)
pgtype = TypeExpression db (null PGltree)
forall (db :: SchemasType) (null :: PGType -> NullType).
TypeExpression db (null PGltree)
ltree
instance PGTyped db PGlquery where pgtype :: TypeExpression db (null PGlquery)
pgtype = TypeExpression db (null PGlquery)
forall (db :: SchemasType) (null :: PGType -> NullType).
TypeExpression db (null PGlquery)
lquery
instance PGTyped db PGltxtquery where pgtype :: TypeExpression db (null PGltxtquery)
pgtype = TypeExpression db (null PGltxtquery)
forall (db :: SchemasType) (null :: PGType -> NullType).
TypeExpression db (null PGltxtquery)
ltxtquery
instance OidOf db PGltree where
oidOf :: ReaderT (K Connection db) IO Oid
oidOf = String -> String -> ReaderT (K Connection db) IO Oid
forall k (db :: k).
String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
"oid" String
"ltree"
instance OidOf db PGlquery where
oidOf :: ReaderT (K Connection db) IO Oid
oidOf = String -> String -> ReaderT (K Connection db) IO Oid
forall k (db :: k).
String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
"oid" String
"lquery"
instance OidOf db PGltxtquery where
oidOf :: ReaderT (K Connection db) IO Oid
oidOf = String -> String -> ReaderT (K Connection db) IO Oid
forall k (db :: k).
String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
"oid" String
"ltxtquery"
instance OidOfArray db PGltree where
oidOfArray :: ReaderT (K Connection db) IO Oid
oidOfArray = String -> String -> ReaderT (K Connection db) IO Oid
forall k (db :: k).
String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
"typarray" String
"ltree"
instance OidOfArray db PGlquery where
oidOfArray :: ReaderT (K Connection db) IO Oid
oidOfArray = String -> String -> ReaderT (K Connection db) IO Oid
forall k (db :: k).
String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
"typarray" String
"lquery"
instance OidOfArray db PGltxtquery where
oidOfArray :: ReaderT (K Connection db) IO Oid
oidOfArray = String -> String -> ReaderT (K Connection db) IO Oid
forall k (db :: k).
String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
"typarray" String
"ltxtquery"
oidLtreeLookup
:: String
-> String
-> ReaderT (SOP.K LibPQ.Connection db) IO LibPQ.Oid
oidLtreeLookup :: String -> String -> ReaderT (K Connection db) IO Oid
oidLtreeLookup String
tyOrArr String
name = (K Connection db -> IO Oid) -> ReaderT (K Connection db) IO Oid
forall r (m :: * -> *) a. (r -> m a) -> ReaderT r m a
ReaderT ((K Connection db -> IO Oid) -> ReaderT (K Connection db) IO Oid)
-> (K Connection db -> IO Oid) -> ReaderT (K Connection db) IO Oid
forall a b. (a -> b) -> a -> b
$ \(SOP.K Connection
conn) -> do
Maybe Result
resultMaybe <- Connection
-> ByteString
-> [Maybe (Oid, ByteString, Format)]
-> Format
-> IO (Maybe Result)
LibPQ.execParams Connection
conn ByteString
q [] Format
LibPQ.Binary
case Maybe Result
resultMaybe of
Maybe Result
Nothing -> SquealException -> IO Oid
forall e a. Exception e => e -> IO a
throwIO (SquealException -> IO Oid) -> SquealException -> IO Oid
forall a b. (a -> b) -> a -> b
$ Text -> SquealException
ConnectionException Text
oidErr
Just Result
result -> do
Row
numRows <- Result -> IO Row
LibPQ.ntuples Result
result
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Row
numRows Row -> Row -> Bool
forall a. Eq a => a -> a -> Bool
/= Row
1) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$ SquealException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (SquealException -> IO ()) -> SquealException -> IO ()
forall a b. (a -> b) -> a -> b
$ Text -> Row -> Row -> SquealException
RowsException Text
oidErr Row
1 Row
numRows
Maybe ByteString
valueMaybe <- Result -> Row -> Column -> IO (Maybe ByteString)
LibPQ.getvalue Result
result Row
0 Column
0
case Maybe ByteString
valueMaybe of
Maybe ByteString
Nothing -> SquealException -> IO Oid
forall e a. Exception e => e -> IO a
throwIO (SquealException -> IO Oid) -> SquealException -> IO Oid
forall a b. (a -> b) -> a -> b
$ Text -> SquealException
ConnectionException Text
oidErr
Just ByteString
value -> case Value CUInt -> ByteString -> Either Text CUInt
forall a. Value a -> ByteString -> Either Text a
Decoding.valueParser Value CUInt
forall a. (Integral a, Bits a) => Value a
Decoding.int ByteString
value of
Left Text
err -> SquealException -> IO Oid
forall e a. Exception e => e -> IO a
throwIO (SquealException -> IO Oid) -> SquealException -> IO Oid
forall a b. (a -> b) -> a -> b
$ Text -> Text -> SquealException
DecodingException Text
oidErr Text
err
Right CUInt
oid' -> Oid -> IO Oid
forall (m :: * -> *) a. Monad m => a -> m a
return (Oid -> IO Oid) -> Oid -> IO Oid
forall a b. (a -> b) -> a -> b
$ CUInt -> Oid
LibPQ.Oid CUInt
oid'
where
oidErr :: Text
oidErr = Text
"oidOf " Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> String -> Text
forall a. IsString a => String -> a
fromString (String
name String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
tyOrArr)
q :: ByteString
q = ByteString
"SELECT " ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> String -> ByteString
forall a. IsString a => String -> a
fromString String
tyOrArr
ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" FROM pg_type WHERE typname = \'"
ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> String -> ByteString
forall a. IsString a => String -> a
fromString String
name ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
"\';"
newtype LTree = UnsafeLTree {LTree -> Text
getLTree :: Text}
deriving stock (LTree -> LTree -> Bool
(LTree -> LTree -> Bool) -> (LTree -> LTree -> Bool) -> Eq LTree
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LTree -> LTree -> Bool
$c/= :: LTree -> LTree -> Bool
== :: LTree -> LTree -> Bool
$c== :: LTree -> LTree -> Bool
Eq,Eq LTree
Eq LTree
-> (LTree -> LTree -> Ordering)
-> (LTree -> LTree -> Bool)
-> (LTree -> LTree -> Bool)
-> (LTree -> LTree -> Bool)
-> (LTree -> LTree -> Bool)
-> (LTree -> LTree -> LTree)
-> (LTree -> LTree -> LTree)
-> Ord LTree
LTree -> LTree -> Bool
LTree -> LTree -> Ordering
LTree -> LTree -> LTree
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: LTree -> LTree -> LTree
$cmin :: LTree -> LTree -> LTree
max :: LTree -> LTree -> LTree
$cmax :: LTree -> LTree -> LTree
>= :: LTree -> LTree -> Bool
$c>= :: LTree -> LTree -> Bool
> :: LTree -> LTree -> Bool
$c> :: LTree -> LTree -> Bool
<= :: LTree -> LTree -> Bool
$c<= :: LTree -> LTree -> Bool
< :: LTree -> LTree -> Bool
$c< :: LTree -> LTree -> Bool
compare :: LTree -> LTree -> Ordering
$ccompare :: LTree -> LTree -> Ordering
$cp1Ord :: Eq LTree
Ord,Int -> LTree -> String -> String
[LTree] -> String -> String
LTree -> String
(Int -> LTree -> String -> String)
-> (LTree -> String) -> ([LTree] -> String -> String) -> Show LTree
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [LTree] -> String -> String
$cshowList :: [LTree] -> String -> String
show :: LTree -> String
$cshow :: LTree -> String
showsPrec :: Int -> LTree -> String -> String
$cshowsPrec :: Int -> LTree -> String -> String
Show,ReadPrec [LTree]
ReadPrec LTree
Int -> ReadS LTree
ReadS [LTree]
(Int -> ReadS LTree)
-> ReadS [LTree]
-> ReadPrec LTree
-> ReadPrec [LTree]
-> Read LTree
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LTree]
$creadListPrec :: ReadPrec [LTree]
readPrec :: ReadPrec LTree
$creadPrec :: ReadPrec LTree
readList :: ReadS [LTree]
$creadList :: ReadS [LTree]
readsPrec :: Int -> ReadS LTree
$creadsPrec :: Int -> ReadS LTree
Read,(forall x. LTree -> Rep LTree x)
-> (forall x. Rep LTree x -> LTree) -> Generic LTree
forall x. Rep LTree x -> LTree
forall x. LTree -> Rep LTree x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LTree x -> LTree
$cfrom :: forall x. LTree -> Rep LTree x
Generic)
instance IsPG LTree where type PG LTree = PGltree
instance TypeError ('Text "LTree binary instances not yet implemented.")
=> FromPG LTree where
fromPG :: StateT ByteString (Except Text) LTree
fromPG = Text -> LTree
UnsafeLTree (Text -> LTree)
-> StateT ByteString (Except Text) Text
-> StateT ByteString (Except Text) LTree
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value Text -> StateT ByteString (Except Text) Text
forall x. Value x -> StateT ByteString (Except Text) x
devalue Value Text
Decoding.text_strict
instance TypeError ('Text "LTree binary instances not yet implemented.")
=> ToPG db LTree where
toPG :: LTree -> ReaderT (K Connection db) IO Encoding
toPG = Encoding -> ReaderT (K Connection db) IO Encoding
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Encoding -> ReaderT (K Connection db) IO Encoding)
-> (LTree -> Encoding)
-> LTree
-> ReaderT (K Connection db) IO Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Encoding
Encoding.text_strict (Text -> Encoding) -> (LTree -> Text) -> LTree -> Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LTree -> Text
getLTree
instance Inline LTree where
inline :: LTree -> Expr (null (PG LTree))
inline
= ByteString -> Expression grp lat with db params from (null PGltree)
forall (grp :: Grouping) (lat :: FromType) (with :: FromType)
(db :: SchemasType) (params :: [NullType]) (from :: FromType)
(ty :: NullType).
ByteString -> Expression grp lat with db params from ty
UnsafeExpression
(ByteString
-> Expression grp lat with db params from (null PGltree))
-> (LTree -> ByteString)
-> LTree
-> Expression grp lat with db params from (null PGltree)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
parenthesized
(ByteString -> ByteString)
-> (LTree -> ByteString) -> LTree -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" :: ltree")
(ByteString -> ByteString)
-> (LTree -> ByteString) -> LTree -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ByteString
escapeQuotedText
(Text -> ByteString) -> (LTree -> Text) -> LTree -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LTree -> Text
getLTree
newtype LQuery = UnsafeLQuery {LQuery -> Text
getLQuery :: Text}
deriving stock (LQuery -> LQuery -> Bool
(LQuery -> LQuery -> Bool)
-> (LQuery -> LQuery -> Bool) -> Eq LQuery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LQuery -> LQuery -> Bool
$c/= :: LQuery -> LQuery -> Bool
== :: LQuery -> LQuery -> Bool
$c== :: LQuery -> LQuery -> Bool
Eq,Eq LQuery
Eq LQuery
-> (LQuery -> LQuery -> Ordering)
-> (LQuery -> LQuery -> Bool)
-> (LQuery -> LQuery -> Bool)
-> (LQuery -> LQuery -> Bool)
-> (LQuery -> LQuery -> Bool)
-> (LQuery -> LQuery -> LQuery)
-> (LQuery -> LQuery -> LQuery)
-> Ord LQuery
LQuery -> LQuery -> Bool
LQuery -> LQuery -> Ordering
LQuery -> LQuery -> LQuery
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: LQuery -> LQuery -> LQuery
$cmin :: LQuery -> LQuery -> LQuery
max :: LQuery -> LQuery -> LQuery
$cmax :: LQuery -> LQuery -> LQuery
>= :: LQuery -> LQuery -> Bool
$c>= :: LQuery -> LQuery -> Bool
> :: LQuery -> LQuery -> Bool
$c> :: LQuery -> LQuery -> Bool
<= :: LQuery -> LQuery -> Bool
$c<= :: LQuery -> LQuery -> Bool
< :: LQuery -> LQuery -> Bool
$c< :: LQuery -> LQuery -> Bool
compare :: LQuery -> LQuery -> Ordering
$ccompare :: LQuery -> LQuery -> Ordering
$cp1Ord :: Eq LQuery
Ord,Int -> LQuery -> String -> String
[LQuery] -> String -> String
LQuery -> String
(Int -> LQuery -> String -> String)
-> (LQuery -> String)
-> ([LQuery] -> String -> String)
-> Show LQuery
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [LQuery] -> String -> String
$cshowList :: [LQuery] -> String -> String
show :: LQuery -> String
$cshow :: LQuery -> String
showsPrec :: Int -> LQuery -> String -> String
$cshowsPrec :: Int -> LQuery -> String -> String
Show,ReadPrec [LQuery]
ReadPrec LQuery
Int -> ReadS LQuery
ReadS [LQuery]
(Int -> ReadS LQuery)
-> ReadS [LQuery]
-> ReadPrec LQuery
-> ReadPrec [LQuery]
-> Read LQuery
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LQuery]
$creadListPrec :: ReadPrec [LQuery]
readPrec :: ReadPrec LQuery
$creadPrec :: ReadPrec LQuery
readList :: ReadS [LQuery]
$creadList :: ReadS [LQuery]
readsPrec :: Int -> ReadS LQuery
$creadsPrec :: Int -> ReadS LQuery
Read,(forall x. LQuery -> Rep LQuery x)
-> (forall x. Rep LQuery x -> LQuery) -> Generic LQuery
forall x. Rep LQuery x -> LQuery
forall x. LQuery -> Rep LQuery x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LQuery x -> LQuery
$cfrom :: forall x. LQuery -> Rep LQuery x
Generic)
instance IsPG LQuery where type PG LQuery = PGlquery
instance TypeError ('Text "LQuery binary instances not yet implemented.")
=> FromPG LQuery where
fromPG :: StateT ByteString (Except Text) LQuery
fromPG = Text -> LQuery
UnsafeLQuery (Text -> LQuery)
-> StateT ByteString (Except Text) Text
-> StateT ByteString (Except Text) LQuery
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value Text -> StateT ByteString (Except Text) Text
forall x. Value x -> StateT ByteString (Except Text) x
devalue Value Text
Decoding.text_strict
instance TypeError ('Text "LQuery binary instances not yet implemented.")
=> ToPG db LQuery where
toPG :: LQuery -> ReaderT (K Connection db) IO Encoding
toPG = Encoding -> ReaderT (K Connection db) IO Encoding
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Encoding -> ReaderT (K Connection db) IO Encoding)
-> (LQuery -> Encoding)
-> LQuery
-> ReaderT (K Connection db) IO Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Encoding
Encoding.text_strict (Text -> Encoding) -> (LQuery -> Text) -> LQuery -> Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LQuery -> Text
getLQuery
instance Inline LQuery where
inline :: LQuery -> Expr (null (PG LQuery))
inline
= ByteString
-> Expression grp lat with db params from (null PGlquery)
forall (grp :: Grouping) (lat :: FromType) (with :: FromType)
(db :: SchemasType) (params :: [NullType]) (from :: FromType)
(ty :: NullType).
ByteString -> Expression grp lat with db params from ty
UnsafeExpression
(ByteString
-> Expression grp lat with db params from (null PGlquery))
-> (LQuery -> ByteString)
-> LQuery
-> Expression grp lat with db params from (null PGlquery)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
parenthesized
(ByteString -> ByteString)
-> (LQuery -> ByteString) -> LQuery -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" :: lquery")
(ByteString -> ByteString)
-> (LQuery -> ByteString) -> LQuery -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ByteString
escapeQuotedText
(Text -> ByteString) -> (LQuery -> Text) -> LQuery -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LQuery -> Text
getLQuery
newtype LTxtQuery = UnsafeLTxtQuery {LTxtQuery -> Text
getLTxtQuery :: Text}
deriving stock (LTxtQuery -> LTxtQuery -> Bool
(LTxtQuery -> LTxtQuery -> Bool)
-> (LTxtQuery -> LTxtQuery -> Bool) -> Eq LTxtQuery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LTxtQuery -> LTxtQuery -> Bool
$c/= :: LTxtQuery -> LTxtQuery -> Bool
== :: LTxtQuery -> LTxtQuery -> Bool
$c== :: LTxtQuery -> LTxtQuery -> Bool
Eq,Eq LTxtQuery
Eq LTxtQuery
-> (LTxtQuery -> LTxtQuery -> Ordering)
-> (LTxtQuery -> LTxtQuery -> Bool)
-> (LTxtQuery -> LTxtQuery -> Bool)
-> (LTxtQuery -> LTxtQuery -> Bool)
-> (LTxtQuery -> LTxtQuery -> Bool)
-> (LTxtQuery -> LTxtQuery -> LTxtQuery)
-> (LTxtQuery -> LTxtQuery -> LTxtQuery)
-> Ord LTxtQuery
LTxtQuery -> LTxtQuery -> Bool
LTxtQuery -> LTxtQuery -> Ordering
LTxtQuery -> LTxtQuery -> LTxtQuery
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: LTxtQuery -> LTxtQuery -> LTxtQuery
$cmin :: LTxtQuery -> LTxtQuery -> LTxtQuery
max :: LTxtQuery -> LTxtQuery -> LTxtQuery
$cmax :: LTxtQuery -> LTxtQuery -> LTxtQuery
>= :: LTxtQuery -> LTxtQuery -> Bool
$c>= :: LTxtQuery -> LTxtQuery -> Bool
> :: LTxtQuery -> LTxtQuery -> Bool
$c> :: LTxtQuery -> LTxtQuery -> Bool
<= :: LTxtQuery -> LTxtQuery -> Bool
$c<= :: LTxtQuery -> LTxtQuery -> Bool
< :: LTxtQuery -> LTxtQuery -> Bool
$c< :: LTxtQuery -> LTxtQuery -> Bool
compare :: LTxtQuery -> LTxtQuery -> Ordering
$ccompare :: LTxtQuery -> LTxtQuery -> Ordering
$cp1Ord :: Eq LTxtQuery
Ord,Int -> LTxtQuery -> String -> String
[LTxtQuery] -> String -> String
LTxtQuery -> String
(Int -> LTxtQuery -> String -> String)
-> (LTxtQuery -> String)
-> ([LTxtQuery] -> String -> String)
-> Show LTxtQuery
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [LTxtQuery] -> String -> String
$cshowList :: [LTxtQuery] -> String -> String
show :: LTxtQuery -> String
$cshow :: LTxtQuery -> String
showsPrec :: Int -> LTxtQuery -> String -> String
$cshowsPrec :: Int -> LTxtQuery -> String -> String
Show,ReadPrec [LTxtQuery]
ReadPrec LTxtQuery
Int -> ReadS LTxtQuery
ReadS [LTxtQuery]
(Int -> ReadS LTxtQuery)
-> ReadS [LTxtQuery]
-> ReadPrec LTxtQuery
-> ReadPrec [LTxtQuery]
-> Read LTxtQuery
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LTxtQuery]
$creadListPrec :: ReadPrec [LTxtQuery]
readPrec :: ReadPrec LTxtQuery
$creadPrec :: ReadPrec LTxtQuery
readList :: ReadS [LTxtQuery]
$creadList :: ReadS [LTxtQuery]
readsPrec :: Int -> ReadS LTxtQuery
$creadsPrec :: Int -> ReadS LTxtQuery
Read,(forall x. LTxtQuery -> Rep LTxtQuery x)
-> (forall x. Rep LTxtQuery x -> LTxtQuery) -> Generic LTxtQuery
forall x. Rep LTxtQuery x -> LTxtQuery
forall x. LTxtQuery -> Rep LTxtQuery x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LTxtQuery x -> LTxtQuery
$cfrom :: forall x. LTxtQuery -> Rep LTxtQuery x
Generic)
instance IsPG LTxtQuery where type PG LTxtQuery = PGltxtquery
instance TypeError ('Text "LTxtQuery binary instances not yet implemented.")
=> FromPG LTxtQuery where
fromPG :: StateT ByteString (Except Text) LTxtQuery
fromPG = Text -> LTxtQuery
UnsafeLTxtQuery (Text -> LTxtQuery)
-> StateT ByteString (Except Text) Text
-> StateT ByteString (Except Text) LTxtQuery
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value Text -> StateT ByteString (Except Text) Text
forall x. Value x -> StateT ByteString (Except Text) x
devalue Value Text
Decoding.text_strict
instance TypeError ('Text "LTxtQuery binary instances not yet implemented.")
=> ToPG db LTxtQuery where
toPG :: LTxtQuery -> ReaderT (K Connection db) IO Encoding
toPG = Encoding -> ReaderT (K Connection db) IO Encoding
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Encoding -> ReaderT (K Connection db) IO Encoding)
-> (LTxtQuery -> Encoding)
-> LTxtQuery
-> ReaderT (K Connection db) IO Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Encoding
Encoding.text_strict (Text -> Encoding) -> (LTxtQuery -> Text) -> LTxtQuery -> Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LTxtQuery -> Text
getLTxtQuery
instance Inline LTxtQuery where
inline :: LTxtQuery -> Expr (null (PG LTxtQuery))
inline
= ByteString
-> Expression grp lat with db params from (null PGltxtquery)
forall (grp :: Grouping) (lat :: FromType) (with :: FromType)
(db :: SchemasType) (params :: [NullType]) (from :: FromType)
(ty :: NullType).
ByteString -> Expression grp lat with db params from ty
UnsafeExpression
(ByteString
-> Expression grp lat with db params from (null PGltxtquery))
-> (LTxtQuery -> ByteString)
-> LTxtQuery
-> Expression grp lat with db params from (null PGltxtquery)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
parenthesized
(ByteString -> ByteString)
-> (LTxtQuery -> ByteString) -> LTxtQuery -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" :: ltxtquery")
(ByteString -> ByteString)
-> (LTxtQuery -> ByteString) -> LTxtQuery -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ByteString
escapeQuotedText
(Text -> ByteString)
-> (LTxtQuery -> Text) -> LTxtQuery -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LTxtQuery -> Text
getLTxtQuery
instance IsString
(Expression grp lat with db params from (null PGltree)) where
fromString :: String -> Expression grp lat with db params from (null PGltree)
fromString
= ByteString -> Expression grp lat with db params from (null PGltree)
forall (grp :: Grouping) (lat :: FromType) (with :: FromType)
(db :: SchemasType) (params :: [NullType]) (from :: FromType)
(ty :: NullType).
ByteString -> Expression grp lat with db params from ty
UnsafeExpression
(ByteString
-> Expression grp lat with db params from (null PGltree))
-> (String -> ByteString)
-> String
-> Expression grp lat with db params from (null PGltree)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
parenthesized
(ByteString -> ByteString)
-> (String -> ByteString) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" :: ltree")
(ByteString -> ByteString)
-> (String -> ByteString) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
escapeQuotedString
instance IsString
(Expression grp lat with db params from (null PGlquery)) where
fromString :: String -> Expression grp lat with db params from (null PGlquery)
fromString
= ByteString
-> Expression grp lat with db params from (null PGlquery)
forall (grp :: Grouping) (lat :: FromType) (with :: FromType)
(db :: SchemasType) (params :: [NullType]) (from :: FromType)
(ty :: NullType).
ByteString -> Expression grp lat with db params from ty
UnsafeExpression
(ByteString
-> Expression grp lat with db params from (null PGlquery))
-> (String -> ByteString)
-> String
-> Expression grp lat with db params from (null PGlquery)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
parenthesized
(ByteString -> ByteString)
-> (String -> ByteString) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" :: lquery")
(ByteString -> ByteString)
-> (String -> ByteString) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
escapeQuotedString
instance IsString
(Expression grp lat with db params from (null PGltxtquery)) where
fromString :: String -> Expression grp lat with db params from (null PGltxtquery)
fromString
= ByteString
-> Expression grp lat with db params from (null PGltxtquery)
forall (grp :: Grouping) (lat :: FromType) (with :: FromType)
(db :: SchemasType) (params :: [NullType]) (from :: FromType)
(ty :: NullType).
ByteString -> Expression grp lat with db params from ty
UnsafeExpression
(ByteString
-> Expression grp lat with db params from (null PGltxtquery))
-> (String -> ByteString)
-> String
-> Expression grp lat with db params from (null PGltxtquery)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
parenthesized
(ByteString -> ByteString)
-> (String -> ByteString) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString -> ByteString
forall a. Semigroup a => a -> a -> a
<> ByteString
" :: ltxtquery")
(ByteString -> ByteString)
-> (String -> ByteString) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
escapeQuotedString
subltree :: '[null PGltree, null 'PGint4, null 'PGint4] ---> null PGltree
subltree :: NP
(Expression grp lat with db params from)
'[null PGltree, null 'PGint4, null 'PGint4]
-> Expression grp lat with db params from (null PGltree)
subltree = ByteString
-> '[null PGltree, null 'PGint4, null 'PGint4] ---> null PGltree
forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"subltree"
subpath :: '[null PGltree, null 'PGint4, null 'PGint4] ---> null PGltree
subpath :: NP
(Expression grp lat with db params from)
'[null PGltree, null 'PGint4, null 'PGint4]
-> Expression grp lat with db params from (null PGltree)
subpath = ByteString
-> '[null PGltree, null 'PGint4, null 'PGint4] ---> null PGltree
forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"subpath"
subpathEnd :: '[null PGltree, null 'PGint4] ---> null PGltree
subpathEnd :: NP
(Expression grp lat with db params from)
'[null PGltree, null 'PGint4]
-> Expression grp lat with db params from (null PGltree)
subpathEnd = ByteString -> '[null PGltree, null 'PGint4] ---> null PGltree
forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"subpath"
nlevel :: null PGltree --> null 'PGint4
nlevel :: Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null 'PGint4)
nlevel = ByteString -> null PGltree --> null 'PGint4
forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"nlevel"
indexLTree :: '[null PGltree, null PGltree] ---> null 'PGint4
indexLTree :: NP
(Expression grp lat with db params from)
'[null PGltree, null PGltree]
-> Expression grp lat with db params from (null 'PGint4)
indexLTree = ByteString -> '[null PGltree, null PGltree] ---> null 'PGint4
forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"index"
indexOffset :: '[null PGltree, null PGltree, null 'PGint4] ---> null 'PGint4
indexOffset :: NP
(Expression grp lat with db params from)
'[null PGltree, null PGltree, null 'PGint4]
-> Expression grp lat with db params from (null 'PGint4)
indexOffset = ByteString
-> '[null PGltree, null PGltree, null 'PGint4] ---> null 'PGint4
forall (xs :: [NullType]) (y :: NullType).
SListI xs =>
ByteString -> xs ---> y
unsafeFunctionN ByteString
"index"
text2ltree :: null 'PGtext --> null PGltree
text2ltree :: Expression grp lat with db params from (null 'PGtext)
-> Expression grp lat with db params from (null PGltree)
text2ltree = ByteString -> null 'PGtext --> null PGltree
forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"text2ltree"
ltree2text :: null PGltree --> null 'PGtext
ltree2text :: Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null 'PGtext)
ltree2text = ByteString -> null PGltree --> null 'PGtext
forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"ltree2text"
lca :: null ('PGvararray ('NotNull PGltree)) --> null PGltree
lca :: Expression
grp lat with db params from (null ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null PGltree)
lca = ByteString
-> null ('PGvararray ('NotNull PGltree)) --> null PGltree
forall (x :: NullType) (y :: NullType). ByteString -> x --> y
unsafeFunction ByteString
"lca"
instance PGSubset PGltree
(%~) :: Operator (null0 PGltree) (null1 PGlquery) ('Null 'PGbool)
%~ :: Expression grp lat with db params from (null0 PGltree)
-> Expression grp lat with db params from (null1 PGlquery)
-> Expression grp lat with db params from ('Null 'PGbool)
(%~) = ByteString
-> Operator (null0 PGltree) (null1 PGlquery) ('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"~"
infix 4 %~
(~%) :: Operator (null1 PGlquery) (null0 PGltree) ('Null 'PGbool)
~% :: Expression grp lat with db params from (null1 PGlquery)
-> Expression grp lat with db params from (null0 PGltree)
-> Expression grp lat with db params from ('Null 'PGbool)
(~%) = ByteString
-> Operator (null1 PGlquery) (null0 PGltree) ('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"~"
infix 4 ~%
(%?) :: Operator
(null0 PGltree) (null1 ('PGvararray ('NotNull PGlquery))) ('Null 'PGbool)
%? :: Expression grp lat with db params from (null0 PGltree)
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGlquery)))
-> Expression grp lat with db params from ('Null 'PGbool)
(%?) = ByteString
-> Operator
(null0 PGltree)
(null1 ('PGvararray ('NotNull PGlquery)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?"
infix 4 %?
(?%) :: Operator
(null0 ('PGvararray ('NotNull PGlquery))) (null1 PGltree) ('Null 'PGbool)
?% :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGlquery)))
-> Expression grp lat with db params from (null1 PGltree)
-> Expression grp lat with db params from ('Null 'PGbool)
(?%) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGlquery)))
(null1 PGltree)
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?"
infix 4 ?%
(%@) :: Operator (null0 PGltree) (null1 PGltxtquery) ('Null 'PGbool)
%@ :: Expression grp lat with db params from (null0 PGltree)
-> Expression grp lat with db params from (null1 PGltxtquery)
-> Expression grp lat with db params from ('Null 'PGbool)
(%@) = ByteString
-> Operator (null0 PGltree) (null1 PGltxtquery) ('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@"
infix 4 %@
(@%) :: Operator (null0 PGltxtquery) (null1 PGltree) ('Null 'PGbool)
@% :: Expression grp lat with db params from (null0 PGltxtquery)
-> Expression grp lat with db params from (null1 PGltree)
-> Expression grp lat with db params from ('Null 'PGbool)
(@%) = ByteString
-> Operator (null0 PGltxtquery) (null1 PGltree) ('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@"
infix 4 @%
instance Semigroup
(Expression grp lat with db params from (null PGltree)) where
<> :: Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null PGltree)
(<>) = ByteString -> Operator (null PGltree) (null PGltree) (null PGltree)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"||"
instance Monoid
(Expression grp lat with db params from (null PGltree)) where
mempty :: Expression grp lat with db params from (null PGltree)
mempty = String -> Expression grp lat with db params from (null PGltree)
forall a. IsString a => String -> a
fromString String
""
mappend :: Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null PGltree)
mappend = Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null PGltree)
-> Expression grp lat with db params from (null PGltree)
forall a. Semigroup a => a -> a -> a
(<>)
(@>%) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGltree) ('Null 'PGbool)
@>% :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGltree)
-> Expression grp lat with db params from ('Null 'PGbool)
(@>%) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGltree)
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@>"
infix 4 @>%
(%<@) :: Operator
(null0 PGltree) (null1 ('PGvararray ('NotNull PGltree))) ('Null 'PGbool)
%<@ :: Expression grp lat with db params from (null0 PGltree)
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from ('Null 'PGbool)
(%<@) = ByteString
-> Operator
(null0 PGltree)
(null1 ('PGvararray ('NotNull PGltree)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"<@"
infix 4 %<@
(<@%) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGltree) ('Null 'PGbool)
<@% :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGltree)
-> Expression grp lat with db params from ('Null 'PGbool)
(<@%) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGltree)
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"<@"
infix 4 <@%
(%@>) :: Operator
(null0 PGltree) (null1 ('PGvararray ('NotNull PGltree))) ('Null 'PGbool)
%@> :: Expression grp lat with db params from (null0 PGltree)
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from ('Null 'PGbool)
(%@>) = ByteString
-> Operator
(null0 PGltree)
(null1 ('PGvararray ('NotNull PGltree)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@>"
infix 4 %@>
(&~) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGlquery) ('Null 'PGbool)
&~ :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGlquery)
-> Expression grp lat with db params from ('Null 'PGbool)
(&~) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGlquery)
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"~"
infix 4 &~
(~&) :: Operator
(null0 PGlquery) (null1 ('PGvararray ('NotNull PGltree))) ('Null 'PGbool)
~& :: Expression grp lat with db params from (null0 PGlquery)
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from ('Null 'PGbool)
(~&) = ByteString
-> Operator
(null0 PGlquery)
(null1 ('PGvararray ('NotNull PGltree)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"~"
infix 4 ~&
(&?) :: Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 ('PGvararray ('NotNull PGlquery)))
('Null 'PGbool)
&? :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGlquery)))
-> Expression grp lat with db params from ('Null 'PGbool)
(&?) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 ('PGvararray ('NotNull PGlquery)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?"
infix 4 &?
(?&) :: Operator
(null0 ('PGvararray ('NotNull PGlquery)))
(null1 ('PGvararray ('NotNull PGltree)))
('Null 'PGbool)
?& :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGlquery)))
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from ('Null 'PGbool)
(?&) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGlquery)))
(null1 ('PGvararray ('NotNull PGltree)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?"
infix 4 ?&
(&@) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGltxtquery) ('Null 'PGbool)
&@ :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGltxtquery)
-> Expression grp lat with db params from ('Null 'PGbool)
(&@) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGltxtquery)
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@"
infix 4 &@
(@&) :: Operator
(null0 PGltxtquery) (null1 ('PGvararray ('NotNull PGltree))) ('Null 'PGbool)
@& :: Expression grp lat with db params from (null0 PGltxtquery)
-> Expression
grp
lat
with
db
params
from
(null1 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from ('Null 'PGbool)
(@&) = ByteString
-> Operator
(null0 PGltxtquery)
(null1 ('PGvararray ('NotNull PGltree)))
('Null 'PGbool)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"@"
infix 4 @&
(?@>) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGltree) ('Null PGltree)
?@> :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGltree)
-> Expression grp lat with db params from ('Null PGltree)
(?@>) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGltree)
('Null PGltree)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?@>"
infix 4 ?@>
(?<@) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGltree) ('Null PGltree)
?<@ :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGltree)
-> Expression grp lat with db params from ('Null PGltree)
(?<@) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGltree)
('Null PGltree)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?<@"
infix 4 ?<@
(?~) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGlquery) ('Null PGltree)
?~ :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGlquery)
-> Expression grp lat with db params from ('Null PGltree)
(?~) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGlquery)
('Null PGltree)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?~"
infix 4 ?~
(?@) :: Operator
(null0 ('PGvararray ('NotNull PGltree))) (null1 PGltxtquery) ('Null PGltree)
?@ :: Expression
grp
lat
with
db
params
from
(null0 ('PGvararray ('NotNull PGltree)))
-> Expression grp lat with db params from (null1 PGltxtquery)
-> Expression grp lat with db params from ('Null PGltree)
(?@) = ByteString
-> Operator
(null0 ('PGvararray ('NotNull PGltree)))
(null1 PGltxtquery)
('Null PGltree)
forall (ty0 :: NullType) (ty1 :: NullType) (ty2 :: NullType).
ByteString -> Operator ty0 ty1 ty2
unsafeBinaryOp ByteString
"?@"
infix 4 ?@