@@ -52,6 +52,8 @@ module Squeal.PostgreSQL.Query
52 -- ** With
52 -- ** With
53 , With (..)
53 , With (..)
54 , CommonTableExpression (..)
54 , CommonTableExpression (..)
55 -- ** Json
57 -- ** Json
56 , jsonEach
58 , jsonEach
57 , jsonbEach
59 , jsonbEach
@@ -718,6 +720,11 @@ unsafeSetOfFunction
718unsafeSetOfFunction fun expr = UnsafeQuery $
720unsafeSetOfFunction fun expr = UnsafeQuery $
719 "SELECT * FROM " <> fun <> "(" <> renderSQL expr <> ")"
721 "SELECT * FROM " <> fun <> "(" <> renderSQL expr <> ")"
724+ :: Expression outer 'Ungrouped commons schemas params '[] (nullity ('PGvararray ty))
725+ -> Query outer commons schemas params '[ "unnest" ::: ty ]
726+unnest = unsafeSetOfFunction "unnest"
721-- | Expands the outermost JSON object into a set of key/value pairs.
728-- | Expands the outermost JSON object into a set of key/value pairs.
723 :: Expression outer 'Ungrouped commons schemas params '[] (nullity 'PGjson) -- ^ json object
730 :: Expression outer 'Ungrouped commons schemas params '[] (nullity 'PGjson) -- ^ json object