@@ -88,12 +88,13 @@ module Squeal.PostgreSQL.Expression
89 , charLength
89 , charLength
91+ -- ** Json functions and operators
91− -- ** json or jsonb operators
92+ -- *** Json and Jsonb operators
96− -- *** jsonb only operators
97+ -- *** Additional Jsonb operators
@@ -101,7 +102,7 @@ module Squeal.PostgreSQL.Expression
104− -- *** Functions
105+ -- *** Json creation functions
105 , jsonLit
106 , jsonLit
106 , jsonbLit
107 , jsonbLit
@@ -1072,12 +1073,18 @@ Table 9.45: JSON creation functions
1072-----------------------------------------}
1073-----------------------------------------}
1074-- | Literal binary JSON
1075-- | Literal binary JSON
1075−jsonbLit :: JSON.Value -> Expression schema from grouping params (nullity 'PGjsonb)
1078+ => x -> Expression schema from grouping params (nullity 'PGjsonb)
1079+jsonbLit = cast jsonb . UnsafeExpression
1076−jsonbLit = cast jsonb . UnsafeExpression . singleQuotedUtf8 . toStrict . JSON.encode
1080+ . singleQuotedUtf8 . toStrict . JSON.encode
1078-- | Literal JSON
1082-- | Literal JSON
1079−jsonLit :: JSON.Value -> Expression schema from grouping params (nullity 'PGjson)
1085+ => x -> Expression schema from grouping params (nullity 'PGjson)
1086+jsonLit = cast json . UnsafeExpression
1080−jsonLit = cast json . UnsafeExpression . singleQuotedUtf8 . toStrict . JSON.encode
1087+ . singleQuotedUtf8 . toStrict . JSON.encode
1082-- | Returns the value as json. Arrays and composites are converted
1089-- | Returns the value as json. Arrays and composites are converted
1083-- (recursively) to arrays and objects; otherwise, if there is a cast from the
1090-- (recursively) to arrays and objects; otherwise, if there is a cast from the