Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
@>. ) :: JSONBExpr a -> JSONBExpr b -> SqlExpr (Value Bool)esqueleto Database.Esqueleto.PostgreSQL.JSON Requires PostgreSQL version >= 9.4 This operator checks for the JSON value on the right to be a subset of the JSON value on the left. Examples of the usage of this operator can be found in the Database.Persist.Postgresql.JSON module. (here: https://hackage.haskell.org/package/persistent-postgresql-2.10.0/docs/Database-Persist-Postgresql-JSON.html)
PostgreSQL Documentation
| Type | Description | Example ----+-------+-------------------------------------------------------------+--------------------------------------------- @> | jsonb | Does the left JSON value contain within it the right value? | '{"a":1, "b":2}'::jsonb @> '{"b":2}'::jsonb(
||. ) :: JSONBExpr a -> JSONBExpr b -> JSONBExpr cesqueleto Database.Esqueleto.PostgreSQL.JSON Requires PostgreSQL version >= 9.5 This operator concatenates two JSON values. The behaviour is self-evident when used on two arrays, but the behaviour on different combinations of JSON values might behave unexpectedly. CAUTION: THIS FUNCTION THROWS AN EXCEPTION WHEN CONCATENATING A JSON OBJECT WITH A JSON SCALAR VALUE!
Arrays
This operator is a standard concatenation function when used on arrays:[1,2] || [2,3] == [1,2,2,3] [] || [1,2,3] == [1,2,3] [1,2,3] || [] == [1,2,3]
Objects
When concatenating JSON objects with other JSON objects, the fields from the JSON object on the right are added to the JSON object on the left. When concatenating a JSON object with a JSON array, the object will be inserted into the array; either on the left or right, depending on the position relative to the operator. When concatening an object with a scalar value, an exception is thrown.{"a": 3.14} || {"b": true} == {"a": 3.14, "b": true} {"a": "b"} || {"a": null} == {"a": null} {"a": {"b": true, "c": false}} || {"a": {"b": false}} == {"a": {"b": false}} {"a": 3.14} || [1,null] == [{"a": 3.14},1,null] [1,null] || {"a": 3.14} == [1,null,{"a": 3.14}] 1 || {"a": 3.14} == ERROR: invalid concatenation of jsonb objects {"a": 3.14} || false == ERROR: invalid concatenation of jsonb objectsScalar values
Scalar values can be thought of as being singleton arrays when used with this operator. This rule does not apply when concatenating with JSON objects.1 || null == [1,null] true || "a" == [true,"a"] [1,2] || false == [1,2,false] null || [1,"a"] == [null,1,"a"] {"a":3.14} || true == ERROR: invalid concatenation of jsonb objects 3.14 || {"a":3.14} == ERROR: invalid concatenation of jsonb objects {"a":3.14} || [true] == [{"a":3.14},true] [false] || {"a":3.14} == [false,{"a":3.14}]PostgreSQL Documentation
| Type | Description | Example ----+-------+-----------------------------------------------------+-------------------------------------------- || | jsonb | Concatenate two jsonb values into a new jsonb value | '["a", "b"]'::jsonb || '["c", "d"]'::jsonb
Note: The || operator concatenates the elements at the top level of each of its operands. It does not operate recursively. For example, if both operands are objects with a common key field name, the value of the field in the result will just be the value from the right hand operand.(
>.> ) :: (a -> b) -> (b -> c) -> a -> cghc-lib-parser GHC.Core.Map.Expr No documentation available.
(
<.> ) :: OsPath -> OsString -> OsPathghc-lib-parser GHC.Data.OsPath Add an extension, even if there is already one there, equivalent to addExtension.
"/directory/path" <.> "ext" == "/directory/path.ext" "/directory/path" <.> ".ext" == "/directory/path.ext"
(
>.> ) :: (a -> b) -> (b -> c) -> a -> cghc-lib-parser GHC.Data.TrieMap No documentation available.
(
<.> ) :: HsWrapper -> HsWrapper -> HsWrapperghc-lib-parser GHC.Tc.Types.Evidence No documentation available.
(
<.> ) :: Path a -> String -> Path ahackage-security Hackage.Security.Util.Path No documentation available.
(
#. ) :: Coercible b c => (b -> c) -> (a -> b) -> a -> cindexed-profunctors Data.Profunctor.Indexed Composition operator where the first argument must be an identity function up to representational equivalence (e.g. a newtype wrapper or unwrapper), and will be ignored at runtime.
-
sqlite-simple Database.SQLite.Simple A composite type to parse your custom data structures without having to define dummy newtype wrappers every time.
instance FromRow MyData where ...
instance FromRow MyData2 where ...
then I can do the following for free:res <- query' c "..." forM res $ \(MyData{..} :. MyData2{..}) -> do .... -
sqlite-simple Database.SQLite.Simple No documentation available.