on dev help sign in
PGSubset
068480eEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+18−23
@@ -54,6 +54,7 @@ module Squeal.PostgreSQL.Expression
54 , index
54 , index
55 , row
55 , row
56 , field
56 , field
57+ , PGSubset (..)
57 -- ** Functions
58 -- ** Functions
58 , unsafeBinaryOp
59 , unsafeBinaryOp
59 , unsafeUnaryOpL
60 , unsafeUnaryOpL
@@ -119,8 +120,6 @@ module Squeal.PostgreSQL.Expression
119 , (.#>)
120 , (.#>)
120 , (.#>>)
121 , (.#>>)
121 -- *** Jsonb operators
122 -- *** Jsonb operators
122− , (.@>)
123− , (.<@)
124 , (.?)
123 , (.?)
125 , (.?|)
124 , (.?|)
126 , (.?&)
125 , (.?&)
@@ -160,6 +159,15 @@ module Squeal.PostgreSQL.Expression
160 , (.|)
159 , (.|)
161 , (.!)
160 , (.!)
162 , (<->)
161 , (<->)
162+ , arrayToTSvector
163+ , tsvectorLength
164+ , numnode
165+ , plainToTSquery
166+ , phraseToTSquery
167+ , websearchToTSquery
168+ , queryTree
169+ , toTSquery
170+ , toTSvector
163 -- ** Aggregation
171 -- ** Aggregation
164 , Aggregate (..)
172 , Aggregate (..)
165 , Distinction (..)
173 , Distinction (..)
@@ -222,15 +230,6 @@ module Squeal.PostgreSQL.Expression
222 , fixarray
230 , fixarray
223 , tsvector
231 , tsvector
224 , tsquery
232 , tsquery
225− , arrayToTSvector
226− , tsvectorLength
227− , numnode
228− , plainToTSquery
229− , phraseToTSquery
230− , websearchToTSquery
231− , queryTree
232− , toTSquery
233− , toTSvector
234 -- * Re-export
233 -- * Re-export
235 , (&)
234 , (&)
236 , NP (..)
235 , NP (..)
@@ -1157,18 +1156,14 @@ infixl 8 .#>>
1157
1156
1158-- Additional jsonb operators
1157-- Additional jsonb operators
1159
1158
1160−-- | Does the left JSON value contain the right JSON path/value entries at the
1159+class PGSubset container where
1161−-- top level?
1162−(.@>)
1163− :: Operator (null 'PGjsonb) (null 'PGjsonb) ('Null 'PGbool)
1160+ (@>) :: Operator (null0 container) (null1 container) ('Null 'PGbool)
1164−infixl 9 .@>
1165−(.@>) = unsafeBinaryOp "@>"
1161+ (@>) = 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)
1162+ (<@) :: Operator (null0 container) (null1 container) ('Null 'PGbool)
1170−infixl 9 .<@
1171−(.<@) = unsafeBinaryOp "<@"
1163+ (<@) = unsafeBinaryOp "<@"
1164+instance PGSubset 'PGjsonb
1165+instance PGSubset 'PGtsquery
1166+instance PGSubset ('PGvararray ty)
1172
1167
1173-- | Does the string exist as a top-level key within the JSON value?
1168-- | Does the string exist as a top-level key within the JSON value?
1174(.?) :: Operator (null 'PGjsonb) (null 'PGtext) ('Null 'PGbool)
1169(.?) :: Operator (null 'PGjsonb) (null 'PGtext) ('Null 'PGbool)