@@ -54,6 +54,7 @@ module Squeal.PostgreSQL.Expression
5454 , index
5555 , row
5656 , field
57+ , PGSubset (..)
5758 -- ** Functions
5859 , unsafeBinaryOp
5960 , unsafeUnaryOpL
@@ -119,8 +120,6 @@ module Squeal.PostgreSQL.Expression
119120 , (.#>)
120121 , (.#>>)
121122 -- *** Jsonb operators
122− , (.@>)
123− , (.<@)
124123 , (.?)
125124 , (.?|)
126125 , (.?&)
@@ -160,6 +159,15 @@ module Squeal.PostgreSQL.Expression
160159 , (.|)
161160 , (.!)
162161 , (<->)
162+ , arrayToTSvector
163+ , tsvectorLength
164+ , numnode
165+ , plainToTSquery
166+ , phraseToTSquery
167+ , websearchToTSquery
168+ , queryTree
169+ , toTSquery
170+ , toTSvector
163171 -- ** Aggregation
164172 , Aggregate (..)
165173 , Distinction (..)
@@ -222,15 +230,6 @@ module Squeal.PostgreSQL.Expression
222230 , fixarray
223231 , tsvector
224232 , tsquery
225− , arrayToTSvector
226− , tsvectorLength
227− , numnode
228− , plainToTSquery
229− , phraseToTSquery
230− , websearchToTSquery
231− , queryTree
232− , toTSquery
233− , toTSvector
234233 -- * Re-export
235234 , (&)
236235 , NP (..)
@@ -1157,18 +1156,14 @@ infixl 8 .#>>
11571156
11581157-- Additional jsonb operators
11591158
1160−-- | Does the left JSON value contain the right JSON path/value entries at the
1161−-- top level?
1162−(.@>)
1163− :: Operator (null 'PGjsonb) (null 'PGjsonb) ('Null 'PGbool)
1164−infixl 9 .@>
1165−(.@>) = unsafeBinaryOp "@>"
1166−
1167−-- | Are the left JSON path/value entries contained at the top level within the
1168−-- right JSON value?
1169−(.<@) :: Operator (null 'PGjsonb) (null 'PGjsonb) ('Null 'PGbool)
1170−infixl 9 .<@
1171−(.<@) = unsafeBinaryOp "<@"
1159+class PGSubset container where
1160+ (@>) :: Operator (null0 container) (null1 container) ('Null 'PGbool)
1161+ (@>) = unsafeBinaryOp "@>"
1162+ (<@) :: Operator (null0 container) (null1 container) ('Null 'PGbool)
1163+ (<@) = unsafeBinaryOp "<@"
1164+instance PGSubset 'PGjsonb
1165+instance PGSubset 'PGtsquery
1166+instance PGSubset ('PGvararray ty)
11721167
11731168-- | Does the string exist as a top-level key within the JSON value?
11741169(.?) :: Operator (null 'PGjsonb) (null 'PGtext) ('Null 'PGbool)