rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Statement.Returning

Synopsis

Documentation

data Returning names a where Source #

Insert, Update and Delete all support an optional RETURNING clause.

Constructors

NoReturning :: forall names. Returning names ()

No RETURNING clause

Returning :: forall names exprs a1. (Selects names exprs, Table Expr a1) => (exprs -> a1) -> Returning names (Query a1)

Returning allows you to project out of the affected rows, which can be useful if you want to log exactly which rows were deleted, or to view a generated id (for example, if using a column with an autoincrementing counter via nextval).

ppReturning :: TableSchema names -> Returning names a -> Doc Source #